Hi,
In the plane wave-incident case, zero phase point is at origin so it is better for you to define your model such that the surface of your EBG lies at origin.
d is the distance of your evaluation surface (where you make integration of phase) from the surface of EBG. To find the final phase you should add your phase with +d/λ*360 , because your scattered wave has passed d distance and its phase is shifted by -d/λ*360 ,So you add this value again to cancel the phase shift. Because you are interested in the phase exactly at the surface of the EBG.
Good Luck,
Leila