Moving a box.

I’m trying to make it so that when the player approaches the box and holds the “e” button he is able to move the box. This is what I have so far:
using UnityEngine;

class MoveBox : MonoBehaviour
{
public Transform player;
public bool hold = false;

void Start()
{
    this.transform.parent = null;
}

void Update()
{
    if (Input.GetKeyDown(KeyCode.E))
    {
        hold = true;
    }
    if (Input.GetKeyUp(KeyCode.E))
    {
        hold = false;
    }
    if (hold == false)
    {
        this.transform.parent = null;
        Debug.Log("released");
    }
}

void OnCollisionStay(Collision col)
{
    if (col.gameObject.tag == "Player" && hold == true)
    {
        this.transform.parent = player;
        Debug.Log("holding");
    }
   

}

}

But it isn’t working, it notices the player holding the “e” button from any distance instead of just when he is near the box. Also the box will only move if he is holding it.

Add a Vector3.Distance Statement. Something like:

if(Vector3.Distance(transform, GameObject.Find(Player).transform))
{
     //Do stuff
}