There's really no average length of stay for a Juvenile in a Juvenile Detention Center as it all depends on what the Juvenile was arrested for and what the judge sentences the Juvenile to.
Some Juveniles may only stay a few days to a month or two in Juvenile Detention before seeing the Judge and being released to their parents or put on community service.
And other Juveniles who committed more severe crimes may stay in Juvenile Detention until they turn 18 and then might still have to go to prison to serve out some more time.
Sometimes a Juvenile might even be sentenced to 25 years or life in prison so if they were say 14 at the time of committing the crime they would stay in Juvenile detention until they turn 18 and then once they turn 18 they would be moved to prison.
So the Juvenile would stay in Juvenile Detention for 4 years before going to prison.
Some Juveniles however for lesser crimes may only serve 6 months to a year in Juvenile Detention.