I have heard that 2 people that committed zinah cannot get married to each other. As in the Nikah would be haram/ void.

And I also heard that the nikah to a person that has been involved in zinah is haram/ void.

The first one is correct if the woman was married when she practiced zinah.
The second is not correct