I looked in the database for my instance of Mattermost 3.7.2 and noticed that the Team database holds two versions of the team name. One is the DisplayName, and the other is Name. I experimented a little and found that the command doesn't work when you use DisplayName. You have to use Name.
The Name is created from the DisplayName by replacing spaces with dashes and converting to lowercase. So if your team name is AMS, then its name in the database is ams.
Try this to see if it works:
sudo ./platform team delete ams