When you sell property, the difference between what you receive and your tax basis in the property produces gain or loss. When selling property, include what you paid for this, such as the land and the cost of constructing the home as well as the initial closing costs (e.g., attorney’s fees, etc.).
A distribution of your investment that is not subject to tax unless the distribution exceeds your investment.