I don't think most people appreciate how much your savings rate matters for figuring out what's optimal here.
If maxing your 401(k) would cause you to pay off your debt in 5 years, then it's very likely a bad call. You'd wind up paying 5 years' of interest on the 18k you didn't pay off this year.
However, if you can pay that debt off in two years while you're maxing your 401(k), then even if it's fairly high interest, it might make sense to make the 401(k) contribution. Why? Because if you're planning on paying low or no taxes in retirement, the tax benefit could be worth way more than 2 years of interest, esp. at your current marginal rate.
Interest rate obviously matters a lot, too.