How to align vertices with other vertices
The best way is to select the vertices that you want to be aligned. Then press s to scale, press z to constrain to the z-axis. Then type zero and press enter. Then all of the vertices will be "flat" or aligned along the z-axis.