Anybody can "retire" at any time. If you mean make it to a point where you are financially stable enough to not work anymore, thats different.
First off you have to plan for that by delaying gratification and saving most of the money you make after paying for essentials. Prioritize needs over wants. Invest. Argue for as much salary as you can get.
Secondly, you have to survive until you get to the point where you don't have to work anymore. You do that by not being a dumbass, by respecting aircraft limitations, best practices and by establishing a strong set of personal minimums and operating parameters that you stay within.
It also helps to already have a military retirement coming in while you're working in any segment of commercial aviation, but especially HAA/HEMS.