The bug
One optional argument of /spreadplayers is called maxHeight, and it sets the Y position under which valid locations should be searched for.
In Bedrock Edition, this position can be specified as an absolute position, or a relative one using ~.
In Java, relative coordinates are not accepted.
How to reproduce
/spreadplayers ~ ~ 0 1 under ~3 false @s
Expected result
The command should spread you to a nearby block
Observed result
Syntax error
Hi!
Thank you for your report!
We've already resolved this issue at MC-195214, so I will close and link this ticket as a Duplicate.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki