Sydney Thunder beat Melbourne Stars by 21 runs (DLS method) in Sydney to progress to the Big Bash League's challenger match.