Thanks for using JustAnswer.com!
Unfortunately, if the sale has happened it is probably too late to do anything about the tax implications.
You could have done a section 1031 exchange (have a third party by a new investment property with the proceeds of the sale) if you would have planned things out prior to the sale. However, once you received a check or cash from proceeds on the sale, the gain in irreversibly taxable.
If there are further questions, please reply to this answer so that I may assist you further. If this answers your question, please rate my performance between OK and Excellent so that I may receive credit for my work. Thanks for your business.
The gains , what can I write off ?