Thanks for getting in touch! Octopus is not able to perform variable substitution on a configuration file inside of the package. The package needs to be extracted before any files can be configured.
Octopus consumes packages with the expectation that they are ready to be extracted at the target. It would be possible using scripts to extract your zip package, perform the variable substitution on files, then use a script step to zip the directory back up and transfer it to where you need it to be.
I believe the above method is the best way to achieve what you are after here.
Does this help?
Let me know if you have any further thoughts or questions here.