If you sold it in 2019 it goes on your 2019 return we file in 2020.
The mortgage doesn't factor into it. Your cost is the purchase price you paid whether you get a mortgage or not. Your gain or loss is simply Sales Price - Purchase cost.
Yes, you would report the sale on your 2019 tax return during the 2020 tax filing period.
When you purchase a property to fix and flip your carrying costs are added to the basis of the property. Carrying costs would include mortgage interest, property taxes, insurance, rehab expenses, etc. They do not include the mortgage principal portion of your payment. All of the carrying costs that are added to your basis will reduce the gain on the sale.
Note: If you are in the business of flipping property, your sales/expenses are reported on Schedule C. If you are not in the business of flipping, then you report as a sale of a capital asset (investments).