Slower servomotor

Hello, I would like to make the movement that is marked in red slower, can someone help me?

#include <Servo.h>   
Servo servo;     
int trigPin = 2;    
int echoPin = 3;   
int servoPin = 9;



long duration, dist, average;   
long aver[3];   


void setup() {       
    servo.attach(servoPin);  
    pinMode(trigPin, OUTPUT);  
    pinMode(echoPin, INPUT);  
    servo.write(0);       
    delay(1000);
    servo.detach();
} 

void measure() {  
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(15);
digitalWrite(trigPin, LOW);
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);
dist = (duration/2) / 29.1;    
}
void loop() { 
  for (int i=0;i<=2;i++) {   
    measure();               
   aver[i]=dist;            
    delay(50);              
  }
 dist=(aver[0]+aver[1]+aver[2])/3;    

if ( dist<30 ) {

 servo.attach(servoPin);
  delay(1);
servo.write(100);                 // RED
 delay(5000);                      //  RED
 servo.write(0);    
 delay(1000);
 servo.detach();      
}
}

(deleted)

Hobby servos do not have a controllable speed.
You can make the servo move in small steps with a slight pause between them to make is more more slowly.
Take a look at the servo sweep example.

spycatcher2k:
Please ask your question in a better way, describe what you want to happen.

I have already said, in the area of //red, the movement that I want to make, I want it to be slower

So, spread out the movement over a longer period of time

Move servo a small step, wait a while, repeat until at target position

The Servo Sweep example shows you how to move a servo at varying speeds.

As everyone says the Sweep example shows a good and simple way to do it.

But if that is too much, you could try using the VarSpeedServo library instead of Servo. It has a speed parameter on the write() command.

Steve