Grappling Strike is a maneuver option for Battle Master fighters (and others with access to maneuvers) that reads (Tasha's Cauldron of Everything, p. 42; emphasis mine):
Immediately after you hit a creature with a melee attack on your turn, you can expend one superiority die and then try to grapple the target as a bonus action (see the Player's Handbook for rules on grappling). Add the superiority die to your Strength (Athletics) check.
Unlike other maneuvers, it doesn't specify that you have to be making a weapon attack (probably so it will combo with the Unarmed Fighting fighting style that was printed in the same book).
Thorn whip is a cantrip with a range of 30 feet and the following description (Player's Handbook, p. 282; emphasis mine):
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.
Despite having a 30-foot range, thorn whip counts as a "melee attack".
Can a character with access to both the maneuver and the cantrip use their action to cast thorn whip, and then spend the superiority die and a bonus action to attempt a grapple from long range, assuming the other requirements for attempting a grapple (such as needing to have an empty hand) are met?