Use below command to extract the PFX file using certificate Chain.
openssl pkcs12 -export -out SSLCertificate.pfx -inkey Certificate.key -in SSLCertificate.crt -in intermediateCA.crt -in rootCA.crt
openssl pkcs12 -export -out SSLCertificate.pfx -inkey Certificate.key -in SSLCertificate.crt