IRA Withdraw and Repayment - 2023

I withdrew $18K from a traditional IRA in Feb 2023 and repaid the same $18K in March 2023 back into the same IRA account.  I received a 1099-R from the brokerage firm indicating that entire $18K is taxable (Box 2a) even though the $18K was repaid within 30 days.  TurboTax (CD) says the repayment is classified as "excess contributions" ($10.5K) for CY23.  How can I avoid a taxable event?