You've created the KeyStore and loaded the private key just fine. Your issue is the manner you are retrieving the Key from the KeyStore.
An alias is generated for you when you load your private key into the KeyStore. You are requesting alias "1" which does not exist so your getKey call returns null.
Key key = ks.getKey("1", "PrivateKeyPassword".toCharArray());
Certificate cc = ks.getCertificateChain("1");
Since you've created a new KeyStore, it obviously contains only the 1 key you have loaded. You can iterate over the list of aliases provided using the first one or you could use a shorter version as follows.
String alias = ks.aliases().nextElement();
Key key = ks.getKey(alias, "PrivateKeyPassword".toCharArray());
Certificate cc = ks.getCertificateChain(alias);
BTW. I'm hoping that the password for the private certificate that you posted on a public forum is for a development certificate.