Mistakenly contributed to Roth IRA

In January 2018 I have mistakenly contributed $11,000 ($5,500 for 2017 and $5,500 for 2018) towards my Roth IRA account.  Right after I made these contributions, I realized that in my case the contributions would not give me a tax advantage so a few hours later I moved the $11,000 out of the Roth IRA account. Recently I received form F1099-R from my financial institution, and whilst box 2a is empty, box 2b is checked for "Taxable amount not determined".  Surprisingly, when TurboTax imported the information on F1099-R, it seems that I am being heavily penalized (the "Federal Tax Due" went up substantially) for this situation.  Has anyone faced a similar situation? If so, is there a way not to be penalized?  By the way, box 7 shows Distribution code "J".  Thank you in advance.