IRA

I turned 71 in December of 2019.  

I retired from teaching in June of 2019.  

During the period from January to June of 2019 I contributed $19,828 to my IRA

I am getting a message that states these funds are considered an excess contribution because the contributions are restricted to people under the age of 70 1/2 yrs old.  

I was not 70 1/2 yrs old until June 24th of 2019. 

How do I get past this error message?