Retirement tax questions

Your 2017 contributions should have been entered on your 2017 tax return and if non-deductible would have produced a 2018 8606 form with the carry froward non-deductible basis in box 14.

Your 2018 non-deductible Traditional IRA contributions are entered as 2018 contributions in the IRA contribution section which will produce a 2018 8606 form with the 2018 contribution on line 1.

When you enter the 2018 1099-R the interview will ask for prior years non-deductible contributions.  You enter the 2017 8606 box 14 amount  that will go on line 2 of the 2018 8606 form.   Line 3 will be the total of line 1 (2017) and line 2 (2018) so that the total of both non-deductible contribution will offset the taxable distribution on lines 6-18.  That depends on line 6 being zero total Traditional IRA 2018 year end value - if a Traditional IRA account still existed then only part of the distribution will be tax free.
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**