The answer is a little tricky. I do recommend that you talk with a tax consultant. However, there is a way to handle it under certain circumstances.
Remember that when you are doing a 1031 exchange you are trading an investment property for an investment property (like kind). So theorhetically you wouldn’t be living in the new property at all.
If you are unable to rent/lease the new property and after sufficient time and true attempts and you must do something to save that financial drain, like moving into it, then there is a possiblity that after a period of time of living at the “investment” property it could be turned into a primary residence.
There are other circumstances that might qualify as well like a divorce etc.
However, advice is cheap. Your best bet is to work with a true tax consultant to work out the game plan that works for you.
In a 1031 echange you are exchanging an “investment” property for another “investment” property so you wouldn’t be living in it. There are circumstances in which you can turn the new investment property into a personal residence but it is a little tricky.
You should contact a tax consultant.
You do have a tax exemption for the property that you are selling if you have lived in the property, as your primary residence, for more than 2 of the last 5 years. The exemption is $250,000 per spouse living at the property.