Retirement tax questions

Clarifying:

 

I had excess contributions in 2022 and then some in 2023.  I realized this in early 2023 and the excess contributions for both years were withdrawn from my account  in April 2023.  I received the 1099-Rs in 2024 and they are both 2023 1099-R forms - one each for the contributions relating to 2022 and 2023.  There was a small loss on the 2022 excess contributions.

 

Codes for 2022 distribution are J, P

Codes for 2023 distribution are 8, J

 - there is also a small taxable amount on this 1099-R

 - the 2023 excess contributions were removed prior to 4/15/2024

 

I mistakenly included the 2023 distribution on my 2023 return, so I believe I need to amend this to remove that distribution.

 

I *think* I need to just amend my 2023 return to remove this distribution and leave the 2022 distribution on my 2023 return and pay the penalty only on that amount.  I need to make sure that this doesn't carryover to the 2024 return.