2024 1099R - Distribution from Roth

In March of 2024, prior to filing my 2023 Year Taxes, I removed $3,500 from my Roth thinking I had excess contributions to my Roth in 2023.  I received a 2024 Form 1099-R showing Box 1 - Gross Distribution of $3,500 and box 16 for State Distribution of $3,500.  Codes J,P.  No other boxes filled in or check-marked.  In March 2024 when the correction was made, I was 59 1/2 so I am not sure why the J code.  Thus, $7,500 less $3,500 means I contributed $4,000 to my Roth in 2023.  It turns out that my reduced contribution limit would have allowed me to contribute $4,289.25. 

 

I am not sure what I need to do with this 1099-R as it says it is 2024 but the correction was to 2023 year.  do I remove this 1099R from my 2024 Tax Return? Do I need to amend my 2023 taxes?  Do I need to complete Form 5329 to identify for Line 1 that exception 21 applies, but I don't think I would be subject to any penalties so not sure about form 5329. Do I need to amend my 2023 1040 Form - again, not sure what would change here since it is a ROTH so after tax dollars?

 

Thank you for any further guidance than what I am receiving while doing my taxes online.