"
unexpected end of file" errors mean that the shell found the opening character(s) for a command grouping, but didn't find the corresponding closing syntax. It reached the end of the file first. This can mean quotemarks, brackets, if..fi, etc.
Note that these can be some of the hardest errors to find. If you're missing a closing quote on a command, for example, it will treat the opening quote on the next command as the closer, and the one after that as an opener, etc, until it meets the final unmatched one at the end. You usually just just have to keep hunting until you find the mistake.
In this case though, your problem is with your function syntax, as CTM pointed out. The closing bracket needs to be separated from the contents by a command separator, which can be either a newline or a semicolon. So this should work as well:
Code:
function put(){ aria2c --timeout=60 --max-connection-per-server=4 --http-user=[myusername] --http-passwd=[mypassword] --dir=/media/downloads $1 ;}