A New York judge imposed the term Wednesday, ending the state's prosecution of the disgraced producer whose case ignited #MeToo.