Investors & landlords

Although they won't meet the 2 year rule, there is a "Reduced Maximum Exclusion" if the move was because of a job-related reason that your jobs moves more than 50 miles.  I think you would qualify for that.

Whether you will pay taxes or not depends on how much gain you have.

You will also pay tax on the depreciation from the rental period.