2005 Toyota Corolla Hood not staying shut

So it happened two days ago, it was just not caughting on the first close, had to close a few times, slamming it shut, and then it just stopped.

Got a new Luggage compartment lock Assembly today, had it put it, then was told it was not working, that the truck was not aligning properly.

How did you fix it?

Trunk! NOT HOOD.