Threshold of surface code under nearest-neighbor correlated errors via an exact statistical mechanical mapping