Yes, it is a choice. Or more specifically, you must pull the creature, but you can pull him 0 feet.
Thorn Whip
You create a long, vine-like whip covered in thorns that lashes out at your command toward a creature in range.
Make a melee spell attack against the target. If the attack hits, the creature takes 1d6 piercing damage, and if the creature is Large or smaller, you pull the creature up to 10 feet closer to you.
The spell does exactly what it says. Many spells and abilities give you the ability to choose, by including the appropriate wording. This one specifically allows you to choose the length you pull the creature (0-10 feet).
Side Note: I am not sure if the wording explicitly makes the pulling be dependent on the attack hitting or just making the melee spell attack. RAI almost certainly it was meant to be dependent on if it hit, but RAW really sounds like it is not.