Technically there are a couple of spell-based routes available, but they might not achieve what you probably want.
The first and simplest (but not easiest) option is Wish, although you will have all the drawbacks of a non-standard use of the spell.
In addition, if you are a 14th-level Wizard in the School of Necromancy, you could cast Revivify, then find a means to cast True Polymorph to transform the dragon into a Dracolich, and hope that it fails its saving throw against your Command Undead feature. In this case, the dragon would be more convenient alive and it doesn't have to be a dragon, just anything with CR 17.
A final option if the dragon is only Large in size is to have someone else cast Enlarge/Reduce to decrease the size of the dragon to Medium. You can then cast Danse Macabre to bring it to life for an hour as a skeleton or zombie (using the corresponding skeleton/zombie statistics in the Monster Manual).