Distance from tagged objects problem

I’m trying to change my boolean to true if the player finds himself within a certain distance of any object tagged as “tree”, ive searched for an answer everywhere but im still unsure as to what is causing the problem in my script. I don’t get any errors however the boolean does not change regardless of the players distance with the tagged objects (which are definitely tagged). Can someone help me out please?

var player : GameObject;
var tree : GameObject[];
var NearTree : boolean = false;

function Awake () {

tree = GameObject.FindGameObjectsWithTag("tree");
}

function Update () {

var distance = Vector3.Distance(player.transform.position, tree.transform.position);

if(distance > 5){
  NearTree = false;
}

if(distance < 5){
  NearTree = true;
}
}

Something like this (not tested) :

 #pragma strict
var player : GameObject;    	//Player GameObject
var tree : GameObject[];		//Tree Array
var dist : float[]; 			//Distane Array
var NearTree : boolean[];		//Boolean Array		

function Awake () { 
	tree = GameObject.FindGameObjectsWithTag("tree");   //Let's find all the tree
	dist = new float[tree.length]; 						//Distance Array match with Tree Array size
	NearTree = new boolean[tree.length]; 				//Boolean Array match with Tree Array size
}

function Update () {

   for (var i = 0; i < tree.Length; i++) {					//For all Tree in the tree Array
   
   		  //Let's Find all distance (dist_) beetween player and all the tree (tree*)*_

dist_= Vector3.Distance(player.transform.position, tree*.transform.position);*_

if(dist *> 5){ *

NearTree = false;
}
if(dist < 5){ //if any distance in dist Array is closer then 5 unit

NearTree = true; //set NearTree bool to true for that tree
}
if(NearTree*){*

}
if(Input.GetKeyDown(“e”) && NearTree == true){ //If close to tree and “E” is pressed
* print(“near tree and e has been pressed”);*
* }*
* }*
}