Greetings,
Okay, so I was having an issue just like this and here is how I fixed it.
First step, under project settings find Android-SDK and make sure you have everything set up. References to how to set them up and get their path can be found around online
Then copy the location of your JAVA(jdk) from the Android SDK settings, open up cmd, then type cd then paste the location of the JAVA you copied.
After that, paste code for the keystore generation (keytool -genkey -v -keystore ExampleKey.keystore -alias [YOUR NAME] -keyalg RSA -keysize 2048 -validity 10000) in the directory and set alias [YOUR NAME] to whatever you like but remember it.
You fill up any of the questions asked and the password.
After generating the file go to the directory (the JAVA directory we copied) where the file was created with your file explorer you will find the keystore here there. Copy or cut the keystore from that location and go to your Unreal project location, find Build folder, then Android folder, then you paste the file here

Now go back to unreal engine, open up the project settings, proceed to Android, then scroll to Distribution signing and fill in the fields appropriately
-Key store is the name of the file generated and add the .keystore behind it
-Key alias is the alias you inputted when generating the file ([YOUR NAME])
-Key password is the password you entered when generating the file as well
then rebuid you project.
NB: In my last two screenshots you will notice my keystore had the extension .jks instead of .keystore. I tried them both and they worked fine for me and this can be changed in the generation code: keytool -genkey -v -keystore ExampleKey.keystore -alias [YOUR NAME] -keyalg RSA -keysize 2048 -validity 10000.
You might also want to delete your Binaries, DerivedDataCache, Intermediate and Saved folder before rebuilding as it is known to save older build configs.



