The Prime Directive

I am getting this below error but I am not understanding what I have done wrong could you please help me with this?
Below is my Program:

// Import statement:
import java.util.ArrayList;
class PrimeDirective {
  
  // Add your methods here:
  public boolean isPrime(int number) {
  if (number == 2) {
    return true;
  } else if (number < 2) {
  return false;
  }
}
  for (int i=2; i < number; i++) {
    if (number % i == 0) {
      return false;
    } else {
    return true;
}
return false;
  }
  public static void main(String[] args) {

    PrimeDirective pd = new PrimeDirective();
    int[] numbers = {6, 29, 28, 33, 11, 100, 101, 43, 89};  

    System.out.println(pd.isPrime(7));

  }  

}

This is my error message :

image

The for statement looks like it isn’t inside the method. Check the brackets.

This is my code now and error now : so where should I put the return statement ?