Redirect User Role When on Specific Page

You can achieve your goal this way:

// Block Access to /wp-admin
function mwd_redirect_if_on_page() {
  if ( is_user_logged_in() && is_admin() && current_user_can( 'contributor' ) && (defined( 'DOING_AJAX' ) && !DOING_AJAX) ) ) {
    wp_redirect( home_url('specific-page') );
    exit;
  }
}
add_action( 'init', 'mwd_redirect_if_on_page' );

If you carefully see I’ve added ajax check. This way contributor won’t be able to access wp-admin but still be able to other ajax requests if there any.