A 17-year-old boy who was charged with assaulting police officers was held since August in solitary confinement in an adult prison because no space was found for him at a juvenile detention facility.