Get your taxes done using TurboTax

You should enter $17,000 because that should be the trust's accounting income.

 

The program, frankly, encounters issues in this exact type of situation (i.e., where there is a loss, that technically cannot be distributed until the trust is terminated, combined with a larger gain that the trustee has the discretion to distribute). The loss offsets the gain, but the issue is attributing the exact amount to the income (it ignores the loss).