Trying to write a delay function based on Blink Without Delay

Here's my attempt. I'm having to call the changeMotorState() function within the new delay function, which is undesirable. I want a simple delay function based on millis.

// constants won't change. Used here to set a pin number :
const int motorPin =  13;      // the number of the motor pin

// Variables will change :
int motorState = LOW;             // motorState used to set the motor

// Generally, you should use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0;        // will store last time motorState was updated

void setup() {
  // set the digital pin as output:
  pinMode(motorPin, OUTPUT);
}

void loop() {
  // here is where you'd put code that needs to be running all the time.
  // if the motor is off turn it on and vice-versa:
  waitNoDelay(5000);
  // set the motor with the motorState of the variable:
  digitalWrite(motorPin, motorState);
}

void waitNoDelay(const long interval) {
  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis >= interval) {
    // save the last time you blinked the motor
    previousMillis = currentMillis;

    cahngeMotorState();
  }
}

void cahngeMotorState() {
  if (motorState == LOW) {
    motorState = HIGH;
  } else {
    motorState = LOW;
  }
}

However, I want control over how long I can keep the LED on or off. For example, LOW for 30s, then HIGH for 15s, then LOW for 300s.

Trying to write a delay function based on Blink Without Delay

That means that you did NOT understand the concept of doing things at timed intervals without using delay().

I want control over how long I can keep the LED on or off. For example, LOW for 30s, then HIGH for 15s, then LOW for 300s.

You do not have to use a constant for the interval. You do not have to use the same value for interval every time.

Your waitNoDelay() function has a silly name, since it doesn't cause any waiting. Change is misspelled in the name of the function that it calls.

You could use such a construct to control your LED (untested):

unsigned long cycleStartMillis ;

void setup(){
  // . . .
  // . . .
  cycleStartMillis = millis() ;
}

void loop() {
  if ( millis() - cycleStartMillis < 30 ) {
     // switch led off
  }
  else if ( millis() - cycleStartMillis < 45 ) {
     // switch led on
  }
  else if ( millis() - cycleStartMillis < 345 ) {
     // switch led off
  }
  else {
    cycleStartMillis = millis()
  }
  // . . .
  // . . .
}

The elapsedMillis.h library does this very well.