If approved by a judge, the state would have five years to help residents transition to apartments and small homes.