Can Long Term Capital Gains be offset with a Short Term Rental Purchase?

If a second home/vacation condo (paid for) is sold after 10 years of ownership and there is a gain, if that money is used to purchase a house in full, to be used only for rental property, can that entire house purchase be used as a deduction (rental business) that would offset the gains tax for the same year (if all transactions are in the same year)? Please note the original condo was not a rental, it was a second home, and the proceeds from that being used to purchase a rental only for business/profit.