With all those vertices selected–and I’m assuming that you want them all in a line on the z-axis, but maintain the curve on x-y–just hit ‘s’ (scale) > ‘z’ (z-axis only) > ‘0’ to flatten it. If it ends up not quite in the spot you want, just move it up or down to suit.
You’re best to leave the Pivot Centre on Individual Origins for something like this.
And if you ever want to do the opposite–scale on two axes, but not on the third–hit ‘s’ for scale followed by Shift-<axis you don’t want to scale> before doing the actual scale operation. For instance, to scale on x and y, but not z: s > Shift-z, etc.