I have had similar issues in the past. Usually if I go into preferences, and untick the box to use the version installed with Unity, then click the browse button, and select the path to the NDK installation.
In the version if Unity I am using, this path is C:/Program Files/Unity/Hub/Editor/2019.2.14f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/android-ndk-r16b
I know this is the same version that ticking that box should use, but for some reason, it fixed the issue for me.