Try adding another maven repository to your project gradle file. For example:
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
If that doesn't work, adding the OneSignal gradle plugin, also to the project's gradle, might do the trick (as suggested in this answer).
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'