For my instrumentation tests I was using
@RunWith(AndroidJUnit4.class)
from
import androidx.test.runner.AndroidJUnit4;
According to the documentation for AndroidJUnit4,
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
AndroidJUnit4ClassRunner
from AndroidJUnit4
If it still doesn't work, make sure that you clean and/or rebuild your project. Also you can check the current version directly in Google's maven repository