If you change investments from one mutual fund to another within a taxable account, then it’s as if you sold your holdings in one account to buy holdings in another. If there is a gain on the transaction, you must report it as capital gain, which may be short term or long term, depending on how long you held the shares. If you stay within the same fund family, you may avoid investment charges, but you won’t avoid taxes.
On a sale of a principal residence, you may avoid tax under the rules.