A New York investment firm has paid $63 million for a Stoughton apartment complex, its fourth in the Boston area.