It was a federal court judge as it dealt with a federal law, they deal with both federal criminal and constitutional matters. They are separate from the state courts which deal with state criminal charges.
Any of the 94 federal district courts can rule on the constitutionality of a federal law. The govt would have to appeal the ruling, there is a federal appellate court above the district court. Then the supreme court above that.
http://www.uscourts.gov/about-federa...-and-structure