Deductions & credits

From Pub 3 ... the third book all military should keep handy ...   

 

What happens if I don't meet the ownership and use tests? If you don't meet the ownership and use tests due
to a move to a new permanent duty station, you can exclude gain, but the maximum amount of gain you can exclude will be reduced. See Pub. 523 for more details.   https://www.irs.gov/pub/irs-prior/p3--2018.pdf

 

From pub 523 : 

 

Work-Related Move
You meet the requirements for a partial exclusion if any of
the following events occurred during your time of ownership and residence in the home.
• You took or were transferred to a new job in a work location at least 50 miles farther from the home than
your old work location. For example, your old work location was 15 miles from the home and your new work
location is 65 miles from the home  .... for the Military a change of station qualifies for this exception. 

 

https://www.irs.gov/pub/irs-pdf/p523.pdf