Usually, in KPOP, girls and guys are scouted when they're pretty young, like 10 to 13, and they begin to get trained from those ages until debut. That's why, if you look at some members' biographies of groups, one or a few of them have similar long years of training. And others have less training years.
For example, Jessica Jung trained for 7 years, from the age of 11 to 18, until she debuted as part of Girls' Generation.
And I think, not sure which one, another member was trained for 6(?) years.
The reasons labels do this are since they invest Heavily [ or as much as they can, if companies are small ] to make sure the groups have strong foundations in their vocals, dancing, sometimes learning languages like English, Japanese, Chinese to appeal to broader audiences, and ultimately reach success.
For smaller companies, they do the best they can to provide everything with less time because of money reasons.
And, as you may know, after being scouted by labels as trainees, some girls and guys get put in TV shows like Produce 48, etc., and they are narrowed down to a specific number of members the labels deem would work. In those shows, I think they might be in their early teens, from 13 to maybe 20.