Capital gains in final year of family trust.

2023 is the final year of a family trust. There are large capital gains from stocks. How do I get the return to have the gains taxed by the beneficiary and not the trust?