Why is IF failing with satl state file from Jenkins?
The jinja syntax error is caused by the {{ around your job var.
Those curly braces are not required as you are already inside jinja block, noted by the {%.

So to get your code working just replace  your {{ job }} by job.
This should be working.