They are only listed to have 2-4 year lifespan in aquariums.
There are many variables from age of fish when you get it,to quality and history of care.
I wouldn't beat yourself up if he looked healthy and happy while you kept him.
To get a male betta to look like the ones most LFS
sell could take a year alone depending on how they are raised,and by who ...