NBC: Man convicted in N.Y. killing is freed on a technicality after a judge says he was held at the wrong prison