What should i do I did a 1031 exchange in 2018

Hello

 

So I sold a property back in June 2018 as a 1031 and bought multiple properties with the exchange

I sold one back in April 2021 at a loss, did a lot of improvements on the property. I tried to continue the sale as a 1031 exchange but it failed so i have the funds from the intermediary Now my question is how would I file that for my tax return.... As form 4797 or 8824 or other form.... I left a couple of details these are just examples of what it would look like.......

Contract sales price $260,000.00

After all the fees    $262,520.00

Depreciation Amount $44,013 

 

Sold for $302,000.00

Settlement Charges $17000.00

Improvements $28,000.00

Asssements paid on the unit (HOA & Repairs): 52,000

 

Now how would this be done as I lost a lot of money in just repairs.

Please let me know if theres a way to solve this issue

Thank You