on keypress find closest target, then change its tag?

Ive been working on a space rts type game, basicly im trying too get the closest transform, wich ive done from looking at awnsers here, and the code works for that well at this point. the Array returns the closest targets Transform just fine when the FindManual(enemiesTargs) is called on KeyCode.Tab, heres where Im not sure and need help. I dont get any errors wit this at all, however when I go too hit tab, All the targets on the screen get changed? Ive tryed about 10 diffrent methods too do this all resulting in ALL the targets getting there name changed, Im guessing its something too do with the way Im instancing my Enemys? they all are enemeys(Clone) and all start with Tag "none". Or target_data keeps passing by All the arrayed objects when I call it on the keypress?.

I need a way too do this, and only change the Tag of the closest enemy returned when tab is pressed.

var target_data : Transform;
var myPosition : Vector3;
var enemiesTargs : Transform[];

function changeClose(){
//Each enemey spawned has this sensor, if its changeTag is true it changes its own tag too "player1_target"
target_data.GetComponent("mouse_sensor").changeTag = true;
//change closest targets tag?
}

function FixedUpdate()
{
    if(Input.GetKey(KeyCode.Tab)) //Tab pressed, Find closest, load target_data?
    GetManual();
    target_data = FindManual(enemiesTargs); 
    changeClose(); //where I change the tag of the closest?
}

function Update() 
{
    myPosition = this.transform.position; //This is the players position too check agianst.
}

function GetManual () {
    var enemyObjects = GameObject.FindGameObjectsWithTag("none");
    enemiesTargs = new Transform[enemyObjects.Length];
    for (i = 0; i < enemyObjects.Length; i++) {
        enemiesTargs _= enemyObjects*.transform;*_
 _*}*_
_*}*_
_*function FindManual (targets : Transform[]) : Transform {*_
 _*var closestDistance = (enemiesTargs[0].position - myPosition).sqrMagnitude;*_
 _*var targetNumber = 0;*_
 _*for (i = 1; i < targets.Length; i++) {*_
 <em>_var thisDistance = (enemiesTargs*.position - myPosition).sqrMagnitude;*_</em>
 <em>_*if (thisDistance < closestDistance) {*_</em>
 <em>_*closestDistance = thisDistance;*_</em>
 <em>_*targetNumber = i;*_</em>
 <em>_*}*_</em>
 <em>_*}*_</em>
 <em>_*return enemiesTargs[targetNumber];*_</em>
<em>_*}*_</em>
<em>_*```*_</em>

If you just want to change the tag of the nearest enemy when Tab is pressed, I think this is the easier way to do that:

function Update(){
  if (Input.GetKeyDown(KeyCode.Tab)){
    var enemies = GameObject.FindGameObjectsWithTag("none");
    var here: Vector3 = transform.position;
    var minDist: float = Mathf.Infinity; // init with max possible value
    var nearest: GameObject;
    for (var enemy: GameObject in enemies){
      var dist = Vector3.Distance(enemy.transform.position - here);
      if (dist < minDist){
        nearest = enemy;
        minDist = dist;
      }
    }
    if (nearest){
      nearest.GetComponent("mouse_sensor").changeTag = true;
    }
  }
}