How to load jQuery in TOP of wp_footer?

To properly enqueue jQuery, it’s usually done with wp_enqueue_scripts, there’s no need to load it from cdn as jQuery library are provides in the wp-includes folder of WordPress.

Only wp_enqueue_script(‘jquery’); is required.

 add_action('wp_enqueue_scripts', 'replace_jquery');

If you really want to replace jQuery with the cdn link, it’s better to register and enqueue it with this function.