So your Closure is adding dist as a output to jar (because rename returns a Buildable thing built by dist) and then from is adding all jar outputs as inputs to dist (because jar.outputs.files returns a Buildable thing built by jar).
You can either use parentheses to be explicit, or better:
Thank you! It’s clear now that you point it out.
The sad thing is that I have parentheses around all my other 'from’s and I removed them from only this one case! I was experimenting with the syntax vs. readability and had convinced myself they weren’t needed. On a better day I like to think I would have clued in Oops.