"Is there any other alternative" - YES DO NOT follow obsolete tutorials, which even for the obsolete OS would not be best practice. The Adafruit website is full of obsolete information which should have been deleted years ago.
If you did nothing, but enter the WiFi details in the GUI it would have worked.
See How to set up networking/WiFi to restore to normal settings.