I'm no expert in these things but I suspect you may have upgraded the version of jinja2 in your user's pip library, but when ansible runs it is picking up the version installed for all users - the 'system' version.
I'm not sure how exactly you resolve this. If you don't have root/sudo access and can't upgrade the system version of jinja2 then maybe you can install all of ansible in your users' pip library, which I think will also pull in the newer version of jinja2.
Another alternative might be to set up a python venv, which you can then install whatever versions you need into, and run ansible from inside the venv.
It's not something I do myself (I prefer to try and have one python and set of libraries for the whole virtual machine), so I can't offer advice on setting up the venv.
Hopefully the above will at least give you some ideas for things to try.
Jon