The problem has more than one face:
Someone supplied the gun (an adult). If supplied to an adult then that idiot let the kid have it. The kid was stupid. The kid got caught.
I think the adult who supplied the gun to the kid should be charged. Guess what happens to an adult who gets a weapon's charge?
Criminal record. Try to get a job after that. I really wish that would happen, because the message would spread faster.
The kid will get away with it (that's a problem in itself) when they turn 18. Makes them feel like all is permitted and explains why they come here and whine while letting the adult responsible for them hold the bag.
Dont you love legal loopholes for kids? They scream they are mature? Ok... let them deal with the mature legal consequences right away. Let's see how long they scream that they're just children still and want their mommy. (I've seen that happen before).