You can simplify somewhat. This ignores line feed and return characters and prints the prompt on any but '0' or '1'
void loop() {
if (Serial.available()) {
char userCharacter = Serial.read();
switch ( userCharacter ) {
case ‘0’ :
controlBoiler ( 0 );
break;
case ‘1’ :
controlBoiler ( 1 );
break;
case 10 : // Line feed
case 13 : // carriage return
break;
default :
Serial.println("Please input 1 (ON) or 0 (OFF)”);
break;
}
}
}