Ok, fixed it by dumping the entire command into a variable and then executing the variable in the CLI:
{
string @FTP = 'request system software add reboot no-copy validate ftp://' + @FTPUsername + ':' + @FTPPassword + '@' + @FTPServer + '/' + @JUNOSImage
//TODO - insert details of change template
//Enter CLI commands
CLI
{
@FTP
}
}