To end your FTP session, simply use the command
quit
The command
close
can be used to close the connection with the current remote FTP site; the open command can then be used to start a session with another site (without quitting the FTP program altogether).
ftp> close
221 Goodbye.
ftp> quit