It's fine to have a dragon in a dungeon. Just give him a big hole to fly out of somewhere.
Also, I hope that the adventure you have is for really high level characters or that completing the adventure does not require slaying the dragon. Dragons are straight up deadly . . . even to high level characters.
General topics, including off-topic discussion, goes here.