Judge Bryan Biedscheid said in a ruling late Thursday that the bulk of the money — $420 million — will be used for treatment services for young people. The rest will go toward awareness and prevention, screening services and other costs over the next five years.