Whether you own capital gains tax on the sale of property while in Chapter 13 bankruptcy depends on the type of loan. For example, if the debt was a nonrecourse debt. In such case, the Debtor would unfortunately have capital gain, as the entire excess of the unpaid principal balance over the Debtor's basis in the land would be treated as section 61(a)(3) gain from dealings in property, and would be included in the amount realized on the "sale or other disposition" of an asset.
My comments are NOT LEGAL ADVICE. They are for informational purposes only. Actual legal advice can only be provided after you have signed an engagement letter. Answering this question does not create an attorney client relationship. Remember that without attorney client privilege you could possibly divulge information that can hurt your legal rights in the future. I am a tax attorney in Miami Florida. I can help you with your federal tax issues via a secure client portal if required.
Whether you owe tax, unfortunately, has NOTHING to do if you actually received the money from the sale. Some unfortunate real estate investors are finding out the hard way that it is actually possible to have Cap Gains when the property foreclosed.
You still must run a calculation to determine your adjusted basis, but the fact that the chapter 13 trustee got the proceeds doesn't affect whether you owe tax.
Your best bet here is to ask a CPA (not a bookkeeper!), not an attorney (unless it is a tax attorney).
There are a few ins and outs on this that are *way* beyond what can be answered in this type of forum.