I recommend to use Gradle dependencies mechanism for this with custom repository as Philip suggested, not use download task
Because it looks closer to dependency semantics (something required for build), rather that output of a task
The issue with Download or Copy task, that you have to redownload it every time after "clean", not shared across projects, not saved to dependencies cache and if you use build cache, it actually pollutes it
We migrated from Download on all our cases when noticed how much time we redownload custom dependency