This is a tough question and a great one to debate. The first thing to point out is that "institutionalized" doesn't necessarily mean prison. It could mean a juvenile detention center or a hospital.
I would argue that each case should be argued on merit. For example, if a ten-year-old is found smoking marijuana, prison is certainly not the place for him. In a case like this, I would recommend the intervention of social services and probably counseling.
On the other hand, a seventeen-year-old who is a regular cocaine user probably needs to go to a rehab center. In my way of thinking, this is still not justification for imprisonment, because he has harmed only himself. Given that cocaine is a highly addictive and destructive substance, he would need to spend time at a rehab facility.
The scenario changes drastically if that seventeen-year-old is dealing cocaine. Being a drug dealer means that you are causing untold harm to other individuals and families by making drugs ready available. A seventeen-year-old who is dealing should do time in a juvenile detention center.