Before your 'Greenfoot.stop()' statement, add the statement to change the world background.
// if in the world class
setBackground("endBackground.jpg");
Greenfoot.stop();
//if in an actor class
getWorld().setBackground("endBackground.jpg");
Greenfoot.stop();