1) submit a corrected 2017 Form 8606
2) submit a correct 2018 Form 8606 showing the basis that was on the 2017 form but belonged on the 2018 form.
Personally, I would use 2017 1040X and 2018 1040X to do these steps, respectively. In Part III you can explain what happened..
Next time, be more careful.