I would firstly agree with CD's post that states that we need to get to the root of the problem so that this kind of thing does not happen.
That said Whiffey is asking for what happens when it does in a case where a 14 year old has committed murder.
I don't think that we should use capital punishment for many of the reasons stated previously.
I also think that a life sentence (life meaning life which we don't currently have in this country) is also too long. People will respond far better if they have hope.
I would look at education, education, education in prison.
Kids (and adults) would go to prison and if they are spending say 10 years inside they would received an education that brought them up to degree level (or equivalent) as well as training in life skills such as anger management, team work etc etc.
For people who are not education based, there would be other skills such as bricklaying, plastering, gardening etc.
At the end of their prison sentence (and you would not be able to leave without certain passes in subjects as well as psychological profiling) they would have to apply for a job and would not be released until they were in full time employment. For the next two years, if they were to leave that job for whatever reason then they would go back to prison and have to reapply for jobs.
I would also give them a prison 'bonus' of a certain amount of money on leaving so that they can integrate easily back into society.
If someone did not want to learn and was disruptive then they would be put into solitary confinement until they did want to participate.