A Prince George’s County judge ruled that the County Council failed to follow the law when it approved a controversial redistricting plan.