You need to select the release build variant for Gradle to use the keystore specified.
To do so, open the "Build Variants" tool window near the lower left corner of Android Studio, then use the dropdown to select "release."
If you don't see the "Build Variants" button, you should be able to find it under View > Tool Windows.