Fossils cannot be used in various location arguments, such as in advancements and predicates. They are also not a valid structure for /locate.
As of 20w11a, nether fossils can be used in location arguments, while normal fossils cannot. This was reported previously as MC-139843, but I was told to create a new issue as the circumstances have changed since its closure.
Related issues
relates to
Comments


Pretty sure that this is a bug. Since nether fossils can be located, fossils in the overworld should.

Dungeons can't be located too!

Can confirm for 1.16 pre-release 2
as of 20w13b Fossils are not considered structures by the /locate command, and neither are Desert Wells, so I'm not sure this is considered a bug.