The simplest way is to simply use a project property.
gradle download -ParchivaVersion=60
and in your task simply do
src "http://..../${archivaVersion}/projec-${archivaVersion}"
There is a more idiomatic way to do it where you could do something in a similar fashion like
gradle wrapper --gradle-version=5.0
for instance you could do
gradle download --archivaVersion=60
This does require a lot more code which for a simple task is not worth it.