The earthquake’s epicenter was 4 miles northeast of Whitehouse Station, New Jersey, according to the U.S. Geological Survey.