the answer to your question is yes you can connect a single or dual usb female connector to a motherboard's 5 pin usb header (in a dual header only one usb is actually connected)
however,............the real question is...............what is the motherboards USB pinout? and does follow the USB standard pinout and of the five pins which end is pin one?
not all motherboards follow the USB pinout spec for onboard 5 pin headers and OEM motherboards are more likely to use a non standard pinout
see if the HP maintenance and service guide for your model has the pinouts of the motherboard
https://support.hp.com/us-en/product/hp-z2-tower-g4-workstation/20063240/manuals
so you really need to look at the board makers motherboard pinout specs before assuming that five pin header is usb, and that it follows the default usb pinout