The Mortgage Debt Relief Act of 2007 allowed homeowners tax relief from taxation on forgiven debt related to a mortgage on their principal residence. This exclusion applies to debt forgiven in calendar years through 2017, as well as debt discharged in 2018 if there was a written agreement entered into in 2017
If any of the provisions above do not apply to your situation, you'll likely owe taxes on the amount of the forgiven debt
For more information, please see the following TurboTax article. https://turbotax.intuit.com/tax-tips/home-ownership/how-to-avoid-taxes-on-canceled-mortgage-debt/L8j...