Voadam
Legend
Sure, you can say that fiction, folkore, and myth are technically different, but then I am not sure what D&D undead from myth you are referencing.that is not a myth.
Vampires are mostly from Dracula and movies. Zombies are from zombie fiction. Skeletons are not really from myth they are from things like the 1970s Sinbad movie. AD&D spectres were the Nazgul from Tolkien. Liches are mostly from R.E. Howard pulp fantasy and such. Most ghost stuff comes from ghost stories, not specific myths. Ghouls are mostly their own thing, partially a take on Lovecraft ghouls and Arabic Ghuls. Mummies are mostly from the classic Mummy movie.
There are a lot of folklore story basis for a bunch of D&D undead, such as banshees, but I wouldn't say there is a strong line between fiction and folklore stories.