Luke was supposed to turn evil after Vader dies and Han was supposed to die halfway through.
But George Lucas backed away insisting Star Wars was "for kids".
https://www.digitalspy.com/movies/a32248066/star-wars-return-of-the-jedi-original-ending/
https://www.reddit.com/r/movies/comments/g6ss0n/once_return_of_the_jedi_was_titled_revenge_of_the/