I mean, no, you can't. You'd appeal, and if the sentencing was actually unlawful you could get it overturned. But if you are asking for an injunction against the practice of a court, and you have the backing of the government, a suit against the official person of the judge(s) is where it would go.