The link you provided to the motherboard spec's gives you the answers to your question.
It shows that the motherboard you are using has an FM2b socket, and it lists the acceptable CPU's that it can use.
Upgrades for your system are very limited because of the proprietary motherboard (and BIOS) that HP uses in their systems. And also the age of the system.
The Ryzen processors use the new AM4 socket. You would need to build a whole new system to use Ryzen as it requires a new motherboard, CPU, RAM (DDR4), graphics card and power supply to run it all.