Have Military Law Questions? Ask a Military Lawyer.
They would likely initiate the process for an administrative separation. Given your tenure, they'd have to grant you a discharge board hearing, where you could push for retention. It would take a couple of months before they could get that started, so if you could show steady progress (even if not in compliance) all the way up to the board, there is a reasonable chance that you'd be retained.
Even if separated, they would have to process your separation up to higher headquarters to see if you should be retired in lieu of separation based on your 18 years of service. They don't have to, but they do have to consider your time in service.