What your asking would have to be built into the program. A few download managers and programs will have the option to shutdown when the download is complete.
If it doesnt, you can tell your computer to shut off after a certain period of time with no activity.