Retirement tax questions

Thank you.   I went to go and do my amended return, when I went to my state tax return, Michigan 2017, Form 5329 Line 18 "enter your excess contributions from line 24 of your 2016 Form 5329".  I entered the earnings amount there and they calculated the additional tax.  So maybe I won't need to amend this return after all?
I filed the taxable gain in 2017 using the 5329 form.