A wildfire had threatened dozens of buildings, including an elementary school in Gloucester County, New Jersey.