A nearly five-year struggle over the future of a Roman Catholic parish in SoHo that began with a sudden padlock on the church doors ended on Tuesday, when New York State’s highest court affirmed that the Archdiocese of New York had the right to demolish the shuttered building despite opposition from the former parishioners.