IRA RMD adjustment for a basis

I took my first traditional IRA RMD in 2019.  When I get the tax form it will likely show that the entire distribution is taxable.  However, I have a small basis in the IRA (about 1% of the total value) due to non deductible contributions made over several years, all of which were properly reported at the time.  How do I ensure that I am not taxed on the non deductible portion of the distribution and then adjust the basis for next year?