The law, which prohibits sex offenders from living within 2,000 feet of a school or park, was passed in 2006.
The judge said his ruling applies to four offenders who challenged the law in court. It's not clear how his ruling will affect other offenders.
Before Jessica's Law passed, the residency requirements applied only to those who committed offenses against children.
The Associated Press contributed to this report.