Retirement tax questions

Thanks.  I previously tried this, but it didn’t  work.  I am 59.5 at year -end, but I had not yet reached 59.5 when  I pulled it out, which I understand to be the marker for return of excess Roth contribution.