Using carryover Capital loss in a IRA or 401k distribution

If I have capital gains in a retirement account, when I take a distribution, can I use my carryover capital loss to offset the capital gains in that distribution, or does it just become a normal distribution that is fully added to my income for tax purposes?