Excess HSA Contribution distribution from previous year

I applied for survivor Social Security benefits in March 2022.  I am over 65, employed, and receiving full medical benefits under an HDHP.  When I was approved for Survivor benefits in June 2022, I was automatically enrolled in Medicare Part A back to September 2021, thus making my September thru December 2021 HSA contributions excess contributions, along with all of my 2022 contributions. 

I stopped my HSA contributions in July 2022.  I requested and received a distribution of excess HSA contributions for 2021 from September thru December, and another excess distribution for 2022 (January thru July).  I received two 1099-SA’s for 2022 – one for normal medical distributions and one for the combined 2021/2022 excess contributions distributions. 

I have not been able to determine how/where to enter the 2021 excess contributions distribution as income for 2022.  Is there a penalty due for the 2021 contributions that became excess contributions when, in June 2021, I was retroactively enrolled in Medicare Part A back to September 2021?  Do I need to file a corrected 2021 return?