Exchange rentals for Apartment building

I want to exchange my rental properties for an apartment building. Is a 1031 exchange the only/best way to do this?

Typically but you’re on a deadline with that.