When executing the following code:
KeyStore ks = KeyStore.getInstance(storeType);
ks.load(new FileInputStream(keyStore), storePassword.toCharArray());
JKS supports using two passwords, one for the store and one for the key inside. PKCS12 does not. When using the keytool, you'll get a warning about this.
When migrating from to the new keystore, the code will likely continue using the old key password, which in this case is not the same.
Java 9 gives a much better exception message around this indicating it might arise from a bad key during decryption.
In this case, make sure to pass in a key password that matches the store password.