1099-R

So I removed an excess Roth IRA  contribution and earnings because  of having no income for 2021. Before I filed my taxes in 2022 I created a 1099- R with codes P and J and paid taxed on the earnings. Now I have a 1099- R  which shows taxable earnings  also partial federal and state tax withholding.  I was told from another post to copy the 1099 R if I had withholding  otherwise to ignore it if I did not. My question is am I being taxed twice on the earnings or should  I leave that line blank

Thanks much