add jquery file if a certain page is included

While you can approach it with “what template is loaded”, WP isn’t engineered for such logic. Template load is result of logic processing, not the other way around.

You should check out Conditional Tags and determine which logical check applies to your situation.

Other than that you should be:

  • running script-related logic on appropriate wp_enqueue_scripts hook
  • let WP handle footer load (which you are doing via registartion), need for explicit print is extremely rare