The matter of who is entitled to the proceeds from the sale of the property should have been settled in your property settlement agreement. The fact that his name may still be on the debt secured by that property has nothing to do with who is entitled to receive the net proceeds, or who has to report the gain. As to reporting the gain, if the real estate you are referring to is investment property, then the owner of that property sustains the capital gain. When your ex did the QCD to you, he ceased being an owner. You acquired his basis in the property and you will be the only person to report the sale, and capital gain, if any from that sale. If the real estate was your home, then the gain, though completely yours, might not be recognized and may qualify for exclusion. Please see your tax advisor if you still have any more questions.
If the property was not your residence and you sold it for more than your income tax basis you would have to report the capital gain on your income tax return and pay all of the taxes. If the property was your residence you would have an exemption of $250,000 in excess of your income tax basis I.