Dragons (or at least a monstrous beast that's covered in scales that fits the description of a dragon) first appear in fantastic fiction in our old friend The Epic of Gilgamesh from 2100BC, literally the first work of published fiction. The beast Humbaba is described thusly;
"he had the paws of a lion and a body covered in thorny scales; his
feet had the claws of a vulture, and on his head were the horns of a
wild bull; his tail and phallus each ended in a snake's head.
We also see him breathing fire
Enlil assigned (Humbaba) as a terror to human beings,
Humbaba's roar is a Flood, his mouth is Fire, and his breath is Death!
He can hear 100 leagues away any rustling in his forest!
Who would go down into his forest!
Enlil assigned him as a terror to human beings,
and whoever goes down into his forest paralysis will strike!"
Which all sounds pretty dragon-like to me.
Note that since dragons are mythological and pre-date writing, they crop up in pretty much every early work of fantastic fiction, including several other potential candidates from Gilgamesh (Kur?) and The Exploits of Ninurta. You might also look at the legends of Cadmus, Ladon and Python in Greek Myth.