Assume that the target of dissonant whispers failed its Wisdom saving throw and that it cannot move.
I don't think that the reason the target cannot move is relevant, but for example it might have a condition that reduces its speed to 0 (such as grappled), or it might be surrounded by "obviously dangerous ground".
Does the target use its reaction to move 0 feet?
Or does it not use its reaction because it cannot move?
Or something else?