You don’t have to do a degree in a University, you can do an apprenticeship or vocational course.
At University I did 3 years of study and 1 year of work placement to get my BSc. A Mech.Eng. is 3-4 years too. If you do a Masters or other post-graduate study it can be longer.