The D&D IP is a set of game rules that enables players to run narrative-based games. It is suitable for any vaguely medieval flavored game and favors custom or "home brew" over published settings. Over the lifetime of the game, several licensed settings have been converted to use the game rules and many other settings have been created expressly for the game. Among the most famous of these are Greyhawk, Dragonlance, Lankhmar, and Wheel of Time. Modified versions of the D&D system have been created for other genres and settings, including modern spy games, urban fantasy, old west, and Star Wars.
It's a false dilemma. D&D can't be turned into a movie any more than the Unreal Engine could be turned into a movie. It's a vehicle/medium, not a story or setting of its own. Yes, D&D has some flavorful tools in the bag, but that's not the same thing.
The Forgotten Realms IP, on the other hand is definitely about the story and setting:
The Forgotten Realms is a vaguely medieval fantasy setting that was originally created by Ed Greenwood as a vehicle for writing fiction. Numerous books have been set in the Forgotten Realms. The setting was also converted to be playable using the D&D game system. A movie is even being made set in the Forgotten Realms.