Is there any way to convert Collision to a Gameobject or Transform?

I’m trying to convert a collision variable “gr” to a gameobject or transform type “myChildObject”

#if UNITY_ANDROID || UNITY_IOS
col = gr;
gr = myChildObject;
if (gr.gameObject.tag == “Pullable”)
{
if(grab == true)
{
Debug.Log(“LL”);
Grab();

        }
    }

    if (grab == false)
    {
        myChildObject.parent = null;

    }

#endif

}

public void Grab()
{   
    gr.gameObject.transform.parent = this.gameObject.transform;
    
}

public void DownGrab()
{
    grab = true;
}

public void UpGrab()
{
    grab = false;
}

}

If your variable is defined as:
Collision gr;

You can access the GameObject with:
gr.collider.gameObject;

If I am understanding your question properly.