Get your taxes done using TurboTax

The penalty is on early distributions included in income.

If you had a basis, the non-taxable part would not be penalized.