The original target didn’t do anything to you.
The text of hellish rebuke makes it clear that you target a creature that damages you:
the creature that damaged you is momentarily surrounded by hellish flames
What did the target of chain lightning do to you? Nothing. Besides making a dexterity saving throw, which in the narrative is something like trying to dodge the lightning, they didn’t do anything at all, much less damage you. So you cannot cast hellish rebuke on the target of chain lightning because they are not a creature that damaged you.
The caster, however, cast a spell, chose you as a targetone of the targets, and damaged you with their spell, making them an eligible target for hellish rebuke.