SFTP uses port 22 by default because it runs as a subsystem of SSH, which listens on port 22. If a server administrator has moved SSH to a different port, SFTP moves with it.
SFTP is not a standalone service - it rides on top of SSH. So it inherits SSH's port. This is different from plain FTP (port 21) and FTPS (port 21 or 990).
If your server listens on, say, 2222, specify it explicitly: sftp -P 2222 username@host on the command line, or enter 2222 in the port field of a graphical or browser client.
A firewall blocking port 22 is a common cause of failed connections. An SFTP connection tester will tell you whether the port is reachable before you troubleshoot credentials.
Try the free online SFTP client — connect to any SFTP server from your browser, no install required.