Zillow Group Inc. reached an agreement to sell about 2,000 properties from the home-flipping business that it’s winding down.

New York-based investment firm Pretium Partners LLC will purchase the homes, according to a person with knowledge of the matter.