In detail, it's slightly different. In the old scheme, the armed forces pension scheme we call AFPS 75, officers could receive an immediate pension after serving 16 years beyond the age of 21. So the earliest you could get a pension would be around age 37. You could start accruing benefits only after age 21, even if you joined at 18. For other ranks, it's 22 years of service from age 18. So you could retire at around age 40. That's AFPS 75.
The new scheme introduced in 2005 has one criterion for officers and other ranks, and we call this the 18/40 point. So it's after 18 years of service and at least age 40. You start accruing benefits when you join.