Movement to vector3 stuck in a loop

I’m having trouble with a script that moves an object to a specific vector. The following method is a couroutine that is passed the target’s position. The execution hangs up at the point where the Debug action is called.
Is this an error having to do with floating point comparisons? Any help is appreciated, thanks in advance.

	IEnumerator GoTo (Vector3 target)
	{
		bool walking = true;
		
		while (walking == true)
		{
			float targetDistance = (Vector3.Distance (transform.position, target));
			Vector3 targetLocation = new Vector3 (target.x, transform.position.y, target.z);
			
			if (targetDistance >= 3.0f)
			{
				MoveTo (targetLocation);
				RotateTo (targetLocation);
				Debug.Log (targetDistance);
			}
			else
			{
				while (targetLocation - transform.position != Vector3.zero && transform.rotation != Quaternion.LookRotation (targetLocation - transform.position))
				{
					RotateTo (targetLocation);
					yield return 0;
				}

				TargetReached (gameObject);
				walking = false;
			}
			
			yield return 0;
		}
	}

    void MoveTo (Vector3 targetLocation)
	{
		transform.position = Vector3.MoveTowards (transform.position, targetLocation, Time.deltaTime * myParams.speed);
	}
	
	void RotateTo (Vector3 targetLocation)
	{
		if (targetLocation - transform.position != Vector3.zero)
		{
			Vector3 turnDirection = Vector3.RotateTowards (transform.forward, targetLocation - transform.position, Time.deltaTime * myParams.turnSpeed, 1.0f);
			transform.rotation = Quaternion.LookRotation (turnDirection);
		}
	}

You should not use strict comparison between vectors for managing movements. Even when using Lerp for smoothing, Vectors will never be exactly equals. Consider using precision instead :

if(targetLocation - transform.position <= precision)
{
  // Under a given precision, you consider that the target is reached
}

For your infinite loop, I guess the problem comes from the movement speed. In your MoveTo method, you apply a speed Forward. If the speed is too high, the movement will do some roundtrip move around the target… forever.

The trick to prevent this loop would be te detect that the GameObject is near it’s target and apply another speed multiplier, decreasing while it approaches the target. This will result in a speed reduction over the last few steps so you will not move farther than the target.