Tax help for military filers

When you rented the house it ceased to be your principal residence and became an investment property.   You did meet the two year residence requirement for primary residence.  Because it was converted to rental, other rules come into play involving depreciation and capital gains.  You would be wise to get some expert help with preparing your tax return for the year that the house is sold.