Five full time years of hard and smart work, learning the ins and outs, the systems, the ways to approach the problems, the consequences of the decisions, and all of the technical stuff that goes into the process.
Some professions take twice that long. Some professions take half that long.
A lot of it depends on the quality of the instruction, the dedication to the study, and the variety of the experiences that will allow you some perspective.