Quote from Hexalobular»
If that doesn't work you need to enchant something, either something that will give you an enchantment you might use sometime or a throwaway item like a stone shovel for 1 lapis and 1 XP level.
Since 1.14 enchanting junk items is no longer necessary, and actually more wasteful - you can just enchant the book (or other valuable item) and if it doesn't get what you want disenchant it in a grindstone, which also recovers some of the XP.
Also, you can use the following link to find out the chances of getting a particular enchantment, although it isn't as useful for books since you can't view the data for a particular enchantment ("Choose an enchantment"), only what you can get at a particular level ("XP to use"):
https://minecraft.tools/en/enchant.php
According to this, there is a 2.6% chance of getting any level of Fortune on a book enchanted at level 30, including a 1.8% chance of Fortune II (they only show the top 25 enchantments but Fortune III would be much rarer, well below 1%, meaning that you'd have to enchant hundreds of times to get it). For comparison, a diamond pickaxe has a 34.9% chance of getting any level of Fortune (21.2% for Fortune III) at level 30.
1