Medical school -> Residency in Aerospace Medicine (RAM) +/- residency in a traditional field. The RAM residency is 2 years if doing it in addition to another specialty, 3 years if doing it alone. There are one or two civilian RAM programs which theoretically would let you do the whole thing as a reservist, but if you really want to go that route you're better served on active duty. It's meant for people who want to do occupational/flight medicine full time. If you just want to flight medicine on the side, become a flight surgeon (has nothing to do with surgery, the military just calls all physicians surgeons) the training program for which is only a few weeks long and it much more amenable to sticking reserve the entire time.
More importantly, what do you think the job entails and why do you want to do it?