Excess contributions

I made excess contributions to my HSA in 2017 but didn't pull them out until 2020. Received a 1099-SA with a distribution code of 2 (normal distribution).  Since it was for 2017 are there are penalties, etc. that need to be paid?