Use an FTP client/library and try the desired operation, such as PUT'ting a file. If it doesn't work, well - the resource (server, path, etc) didn't exist, wasn't writable, or otherwise wasn't accessible.
FTP doesn't allow a way of querying if a directory is writable or if an operation is allowed, other than trying it. And without actually using FTP, there is no way to tell if the URI is even "valid" for such use.
A common library used is Apache Commons Net (which includes FTP support), but it may be possible to use URLConnection for a simple upload as discussed here.
An aside:
If it is at all possible to avoid FTP, do so! A "drop in" replacement is SFTP, which uses the much more secure SSH stack.