Take the late RMD for 2018 now (and the RMD for 2019 if you have not already done so), then file 2018 Form 5329 Part IX requesting a waiver of the excess accumulation penalty. Instructions are provided on page 8 of the Instructions for 2018 Form 5329 (see "Waiver of tax"):
https://www.irs.gov/pub/irs-prior/f5329--2018.pdf
https://www.irs.gov/pub/irs-prior/i5329--2018.pdf
The distribution is taxable on the tax return for the year the distribution is received (which should be 2019 if you act promptly).