Excess contribution of Roth in 2023

I am 68 year old. I had excess contribution of Roth in 2023 (excess amount of $6300). I withdrawn the excess contribution plus the earnings of $1705 in 2024 before the due day. I got the 2024 1099-R form in 2025 with code P and J. Now I am trying to submit amend 2023 tax return for it. TurboTax told me I need to pay $519 for Federal and $98 for VA state and no extra tax. My question is that for $1705 earnings why I need to pay so much taxes? I should not get the 6% penalty right?  My tax bracket is 24% in year of 2023.

 

Thank you!