There are two types of 401(k) plans: traditional and Roth. Contributions to a traditional 401(k) (indicated by code D in Box 12 of the W-2) are tax-deferred. The code AA shown in Box 12 of your W-2 indicates a contribution to a Roth 401(k). Unlike Traditional 401(k) contributions (which are pre-tax), Roth 401(k) contributions are included in income (i.e, not deductible).
For more information, please see IRS
Retirement Plans FAQs for Designated Roth Accounts.