How to add custom meta box when you have a custom page template file

The front page configuration is a site option. You can know if the site is configured to display a page with get_option( 'show_on_front' ) and get the ID of the page with get_option( 'page_on_front' ).

You could do something like this:

add_action( 'add_meta_boxes', 'cyb_add_metaboxes', 10, 2 ); 
function cyb_add_metaboxes( $post_type, $post ) {

   if( $post->ID == get_option( 'page_on_front' ) ) {

      add_meta_box('front-page-metabox', 'Front page metabox', 'cyb_front_page_metabox', 'page' );

   }

}

// Metabox callback
function cyb_front_page_metabox() {
}

But with this method, the page needs to be created and assigned to front page before the metabox is rendered. I don’t know what kind of data you want to store in the meta fields for the front page, but I think you should explore the customize API, specially if you want to use the metabox for site’s front page configuration or site’s front page presentational options.