A New York man was taken into custody after he allegedly tried to set his Upper West Side house on fire Thursday night, police said.