What did not have any problems before?
You mean with the old CPU?
Remember the Motherboard thinks it has the old CPU so you need to clear the bios so it can discover the new CPU.
You did check to see if the bios supports that CPU? You might need to update.
and that the mother board supports that CPU voltage wise.
and the power supply can provide enough current?
HP's are built with PS with just enough power to work as supplied, so you might need to get a replacement.
I would start with HP website.
Now if it was working with the new CPU but now doesn't it can still be not enough power.