Snap to cursor on only one axis
With cursor positioned as desired and vertices / edges selected scale it while choosing axis which you'd like to affect on scaling (in this case Global X):


Select vertices, set Pivot Point to 3D Cursor.
Press S to scale, then X to scale to 3D Cursor by X axis axis.
Enter amount of effect of scaling. In this case it will be 0.