You don’t have an else statement. That’s going to generate errors.
Also you would be better off with a service template rather than a data template (scripts are services):
- service_template:
{% if is_state('device_tracker.pal_presence', 'Away') and is_state('device_tracker.eva_presence', 'Away') %}
script.espresso_turn_off
{% else %}
## another service here
{% endif %}