As an enlisted guy I’m pretty sure my oath was also indefinite.Big difference is officers can resign anytime they wanted to. NCO’s could not.
I remember that fact from Navy Officer Candidate School (OCS). When I signed up it was as an Officer Candidate Seaman Apprentice. If I bilged OCS, I still owed the Navy four years of enlisted service. Nice incentive to focus the mind.