Problem with collision,Problem with colliding

So there is one object that wants to eat another object.
It has an on trigger enter, the object takes the furthest one away as a target and starts move to it
But the problem is that if it crosses another same object before getting to the target, it triggers the action and the target disappears before the object even gets there. they are instantiated from prefabs so they are identical objects (targets)

So the action that we want is that the object goes through any other objects, not triggering anything before getting to the target.
But now the action is triggered from any object not just the target.
,

If I understand correctly, your object is getting destroyed because its colliding with other objects before it gets to your target? If so, why don’t you just assign a tag to your target?

  If (collision.gameObject.tag == “Target”)
  // destroy target