No, you won’t have to pay taxes on the sale of any appreciated assets within your 401(k) during rebalancing. Your capital gains in a 401(k) aren’t taxed until the money is withdrawn from the account. Selling assets to rebalance a regular brokerage account, however, will incur taxes.