[...] your coworker [...] was not selected, and now is feeling rejected by this situation.
So said coworker values the idea of being a 'leader', or at the very least the idea of being part of the program.
there are no 'hard requirements" for this program
So it is based on someone's opinion/evaluation, which may or may not reflect your coworker's merit.
The logical conclusion would be that, if your coworker wants to get an invitation to the leadership program, then they need to match the evaluator's expectations.
As it stands, this may have nothing to do with their professional competency at all. Let's assume, for a second, a technical specialist like a software developer: the only practical 'path to leadership' would be a position as Lead Developer. The Leadership Program may be focused on administrative leadership, with a Venn diagram showing a surprisingly small shared area between the two administration aspects.
The best approach in my opinion would be to make it clear to your coworker that you participating in the program doesn't interfere with your relationship with them at all, and that you're sympathetic to their situation. As it is, your presence on the program may even reward them with an insight on expected traits, thus helping them in the long run.