Yes, takes lots of stars to align to not have some years between resigning from one residency and starting as a PGY1+ in the new one.
For military you would apply to the GMESB for the new specialty. You would very much benefit from getting a letter from the current PD in support of application.