Get an Object to move to a Position for a Fixed time

Hey, I am trying to get this object to move to “EndPoint”. The code is working, I just don’t want to set the speed it moves at, but the time it takes to reach its destination. Anyone got any ideas of how to fix this? Thank you in advance!

 void Update () 
    {
	if(EndPoint != Vector3.zero)
		{
        myTransform.position = Vector3.MoveTowards(myTransform.position, EndPoint, Time.deltaTime * MuzzleVelocity);
		}
	if(myTransform.position == EndPoint)
		{
		Destroy(gameObject);
		Debug.Log ("Destroyed Object");
		}
}

Time and speed are easily interchangeable. You can take the distance to the destination divide it by time you want your object to move and you’ll get the speed your object should move with.

I use enumerators for this:

private float movementTime = 2;
private float lerpTime = 0.05f;

void Start(){
    StartRoutine("MoveTo", new Vector3(1,0,0);
}

IEnumerator MoveTo(Vector3 destination){
    float timeEllapsed = 0;
    Vector3 origin = transform.position;    

    while (timeEllapsed < movementTime){
        transform.position = Vector3.Lerp(origin,destination,timeEllapsed/movementTime)
        timeEllapsed += lerpTime;
        yield return new WaitForSeconds(lerpTime);
    }
}

Haven´t tested particularlly this one, it might need you to fix it somewhere!