I think D&D's dominance has more to do with the trappings of the game's design than it has to do with the fantasy genre.
In D&D you have character classes that provide players with fairly clear-cut roles--warrior, healer, nuker, expert, and so forth. Note that there's no real attempt to be faithful to the fantasy genre here: it's not like Tolkein, Moorcock, Howard, or Leiber ever wrote about such a mix of diverse characters banding together and raiding dragon lairs for loot. But it works as part of a game, allowing even groups of strangers to quickly throw together a party and start killing baddies and amassing treasure.
In D&D, magic keeps the game moving. If you get hurt, you can be cured. If you get killed, you can be raised. If you need to know something, it can be augured, divined, or communed. If you need to get somewhere quickly, you can be teleported. There's a way to fix anything that might sideline a player or stop the action. Again, this isn't really true to the genre. In the majority of fantasy fiction, death is actually a major inconvenience with some long-lasting ramifications (paticularly for the individual who died). But it works as part of the game, and keeps the party rolling forward, killing baddies and amassing treasure.
I could go on, but the point is that it is D&D (and by extension, d20) that's popular, not fantasy. Plenty of fantasy games that tried to be more faithful to the genre (or at least some subset of the genre) have gone down the tubes. D&D provides a simple, efficient formula for assigning roles to individuals and objectives to the group. It's not perfect, but it's expedient and that's ultimately what makes it work.