You can't just fix that in code. FTP and SFTP are completely different protocols that use different servers.
You need a new server to talk to in order to fix that. And if it's a customer server maybe it can only do FTPS rather than SFTP.
You need a new server to talk to in order to fix that. And if it's a customer server maybe it can only do FTPS rather than SFTP.
If sftp is a requirement, it should have been captured earlier in the process and not after the integration code was written.
This is what just an exemple, think about application level encryption, leakage in logger messages etc.