distribution of an after-tax contribution to 401(k) - not rolled over into IRA

I made a combination of pre-tax and after-tax contributions to a fidelity 401(k) plan.  I recently closed the account and took the following actions:

  • Pre-tax contributions were rolled over into a traditional IRA
  • After-tax contributions (approximately $10k) were not rolled into an IRA.  Instead, I took a full distribution of the after-tax amount (i.e. got a check).

My scenario is similar to the example on this page:
https://www.irs.gov/retirement-plans/rollovers-of-after-tax-contributions-in-retirement-plans

 

Do I owe taxes on the after-tax contributions?  I already paid taxes on these before the original contribution to the 401(k) plan was made.

 

Fidelity sent me a 1099-R, which lists the

  • Taxable amount (box 2a) as $0.00
  • Distribution code (box 7) as "1" (early distribution, no exception)

 

However, the IRS sent me a letter stating that I need to pay taxes on the $10K after-tax contribution as if it was regular income.

 

I am not 59 1/2.