Not super familiar with the inner workings of gradle but I also had the same issue when following the tutorial. I didn't bother to find a fix at the time but this question prompted me to look it up and I have noticed that the mods.toml that was created for me sets the version property to "${file.jarVersion}" while the version on Cadiboo's github has the element set to "${version}", so I have to assume that the expand operation is first trying to find the file property of the internal SimpleTemplateEngine, as the gradle docs show this is what the expand function uses to actually expand the elements, which the file property does not belong to explaining the error.
I would try using the mods.toml file stub that Cadiboo is using located here and see if that resolves the issue, which seems likely to be the fix.