Your ending in Star Wars: The Force Unleashed depends on a choice near the finale.
To get the Jedi ending, walk forward and take the fight to the Emperor. To unlock the Sith ending, jump down and finish off Darth Vader instead. Your decision there shapes how the story concludes.
As for the Ultimate Sith Edition, players have wondered whether the Jedi ending is still an option there too, so that's worth checking if you're playing that version.