import com.google.android.gms.maps.SupportMapFragment;
import androidx.fragment.Fragment;
...
private SupportMapFragment mMapFragment;
...
mMapFragment = (SupportMap
Make sure that in the fragment java class you import androidx.fragment.app.Fragment; and in the java class from where you refer to this particular fragment, you also import Fragment the same way i.e. import androidx.fragment.app.Fragment;
After that to get a reference of the fragment we created, use getSupportFragmentManager().findFrgmentById(R.id.fragment_id).
To summarise, make sure you have the same import in all concerned Java or Kotlin classes.