The length of time you can survive in the ocean without a life jacket is an hour at most although might only survive for a 10 minutes to 20 minutes if you're a good swimmer.
If you're out in a deep ocean far away from anyone to help you and you have no life jacket to help keep you afloat then you would need to continue swimming to help you stay afloat which will use up your energy.
With a life jacket you would at least be able to stay afloat above water but would still eventually die within days or sooner depending on the water temperature and how long you go without any food and water to drink.
Without a life jacket though you could and often will tire out really quickly within a matter of only minutes although it may be hours depending on your own physical health and condition and how well you can swim.
At a water temperature of 50 F to 60 F degrees you could survive for around 1 to 6 hours and may get exhausted within 1 to 2 hours.
At a water temperature of 60 F to 70 F degrees you could survive for around 2 to 4 hours or sometimes longer but may get exhausted within 2 to 7 hours.
At 70 F to 80 F degree water temperature you could become exhausted or even unconscious within 2 to 12 hours or may survive 3 hours to an indefinite amount of time.
The warmer the water temperature the longer you're likely to survive.
It's always important to wear life jackets when out on the water and especially when out on the ocean.