Well, tbh, I have to credit Dragonlance. I know that goes against the rules of the thread, but it's the truth. I had no idea that D&D existed before reading a Dragonlance novel and seeing an advertisement for the game at the back of the book.
However, if I had to credit something with planting the original seeds of wanting to play something like D&D, I would have to say that Joe Dever's Lone Wolf series was a huge influence on my childhood. I gained an interest in fantasy adventures in general via The Riddlemaster of Head (Patricia A. McKillip); The Black Cauldron (Lloyd Alexander); the old Ghosts & Goblins arcade game; a general interest in mythology; and (as odd as it may sound) a "children's*" version of the Old Testament I had which was written and illustrated somewhat like a graphic novel.
*by today's standards, it would likely be considered too graphic for the age I was at the time
Though, funny enough, D&D was not my first rpg. I attempted to buy the game, but I was not allowed to do so because of a local parenting group pressuring Toys'R'Us to no longer sell the product** (because it was allegedly corrupting the morals of youths and allegedly teaching children how to summon demons and commit suicide). At the time, there was no gaming store in this area. The first ttrp I played was Rifts, while deployed to a UN peacekeeping mission as part of the US military. I was back in the states just long enough to see D&D 3.0 again; I bought it; played for about a week; deployed again; and then had enough time at home to discover that the game had become D&D 3.5 and that there was a gaming store opened near my hometown.
**somehow, I suppose killing evil monsters while masquerading as dwarves and elves was taboo, yet reading a religious book depicting genocide, adultery, and murder was educational, but I digress. (This is not a knock against religion or anyone's faith; it's simply something which amuses me when I think back upon those memories.)