What happened to Jack as an accomplice--if nothing else--in the murder of Simon? With witness reports from the others, Jack should be implicated in Simon's murder and be held accountable for this crime in a trial by jury. Testimony by psychologists who treat him can be included in this trial, of course.
At the end of the novel when the sea captain comes onto the island to investigate and then rescue the boys, Golding writes,
A little boy who wore the remains of an extraordinary black cap on his red hair and who carried the remains of a pair of spectacles at his waist, started forwrd, then changed his mind and stood still.
This passage seems to indicate that Jack halts as he reckons his complicity in murders, that of Simon as well as that of Piggy, whose glasses he has confiscated after Piggy's brutal slaying. Jack is not so sure that he wants to return to society as he has stepped outside its perimeters.
Jack is a sociopath and cannot be released safely back into society now that he has committed murder. His obsession with hunting and his enjoyment of the sadistic torture killing of the sow demonstrate that he is beyond help in terms of rehabilitation. The best that I could recommend for Jack is incarceration in a facility for the criminally insane where he could receive medication to control his impulses and therapy to attempt to help him deal with his past actions.
Ralph could be assimilated back into society. He has shown that he has a conscience, leadership qualities that are positive, and concern for the well-being of other people. I would recommend intensive psychotherapy and housing him in a mental health facility designed for long-term treatment of emotional disturbances. Once he demonstrated stability, I would move him into progressively less restrictive environments, keeping him in therapy until he reaches adulthood. I have confidence that Ralph could lead a normal adult life.
They would need therapy, specifically de-programming therapy which is the same one they use for people who join extreme religious cults and are rescued from them. The kids had lost their sense of self and are now part of a sect, a separate and homogeneous group within which there are now subgroups (Jack or Ralph followers). For this reason, the kids would have to be de-progammed from the practices in the island, and for the personas they adopted and somehow be brought back to a mid point where they can re-instate themselves in normal society.
I agree that Jack is a sociopath, but I am not sure that he could be convicted of a crime. It would be hard to prove jurisdiction in which the crime took place, so when they get back to England, he should be expelled and advised to seek counseling, and let his family decide what his punishment should be, if any.
As for Ralph, simple counseling for what he went through on the island should return him to normal at the school, and I see his being elected school president in his last year.