The FTP.list method is way too low-level. It does not even open a data connection. It just sends the LIST command. You cannot use it on its own. As it's documentation say:

A convenience method to send the FTP LIST command to the server,
receive the reply, and return the reply code. Remember, it is up
to you to manage the data connection. If you don't need this low
level of access, use FTPClient, which will handle all low level details for you.