I don't know the details of the case. Also, family law is not an area of concentration for me. When issues with minors arise, judges use special discretion. It has been a long time since law school. If I recall correctly, family court judges have broad powers. They use their educated hunches more. For example, they interview children. My state allows special training for the judges so they can be more effective.
The judge is likely to hear similar cases on a routine basis. Since these matters happen regularly, the judge will have more expertise in such areas as when a child develops a separate moral conscience. They are trained in psychiatry. The judges make legal judgments. Law is the basis, not social science. They develop rapport with young children and teenagers.
I suspect the judge may appoint some lawyer to represent the minor. It will vary from state to state. I feel a lot will depend on the judge's personal balance of First Amendment right to freedom of religion vs. the immaturity of teenagers. The details matter a lot.
As I wrote earlier, the decision allowing a fourteeen year to decide for death upset me deeply. All I had to do was to remember how I was at fourteen. My world centered on the fashion mores of my KH, school, and the Beatles, esp. Paul. All the girls in my group used to attend Beatles films and screech our heads off. We wrote down their names thousands of times. One girl was famous for sending her many thousands of George Harrison]s name to George's mom. His mom wrote her a nice, short reply. Yes, I was mature.
I was better at seventeen. Let me see. I had a part-time job with all the proceeds going to makeup, fashion, and rock concerts. My life was spent in Greenwich Village and the portion of Central Park where hippies hung out. The war in Viet Nam was opposed. Demos were an opportunity to politely meet with elected officials. They were also rock group happenings and dating scenes. I had yet to attend a single college course. In fact, most of what made me be me today had not yet happened. My college and law school years completed the basic me.
Perhaps the judge will somehow realize that the boy's action is extreme. Religion can be respected without full implementation. Once the boy has achieved maturity in legal terms, he can decide to die for a religous doctrine. It strikes me that we should have a societal policy rather than a more casual judge decision. If the judge is elected, the judge might be afraid of the backlash from powerful religious people who vote.
I vividly recall a family court judge speaking to a gathering during law school. She had real power but it brought so many headaches. I decided civil rights was the way to go. Corporate antitrust never upset me. Children bother me. She warned the women present against a career in family law. It was a very small and intimate gathering.