A centred zip
Baste the seam shut, press it open, and place the closed zip face down on the wrong side with the teeth on the basting. Stitch from the right side, an equal distance each side of the seam, and across the bottom if the pattern says. Then remove the basting.
If one side is stitched closer than the other, the teeth pull off centre. Mark the stitch line with chalk if you need a guide. A stitch-in-the-ditch foot is the wrong tool here.
This is a clear method for a first zip. A lapped zip hides the teeth with one fold. An invisible zip uses its own foot. Pick one method and stay with it.