You have to be over 55, the property in question has to have been the primary residence for 2 of last 5 years, and the replacement property must have a purchase price less than or equal to the sales price of the original home.
It has to do with prop 60/90, not 13. If you’ve been depreciating the rental for tax purposes over the last 5 years, you would probably have to recapture some of that if you sold. Talk to a CPA.