1099-R may have the wrong code

Hello and thank you in advance for the help.

 

I withdrew contributed funds from my Roth IRA, not gains just an amount I contributed before. I received a 1099-R from my bank with a J code saying that it was an early withdrawal. Is the code wrong or do I just have to play with the system to make it not tax me?

I'm also confused because at the "Here's a picture of your income tool" it counts the amount as "IRA Distributions - Nontaxable" income but wouldn't it have counted as income the year that I placed it into the Roth because it was previously taxed?