Error message when trying to convert private key from a pem-file to a pvk-file
So, have you tried first converting your .pem to a .crt, converting that .crt to .pvk?
Convert .pem to .crt:
openssl x509 -outform der -in your-cert.pem -out your-cert.crt
Convert .crt to .pvk:
openssl pkcs12 -export -out name_of_cert.pfx -inkey name_of_key.key -in
name_of_cert.crt