How to implement template file and the loop

I have seen that there is extra (); so maybe this syntax error prevent display in front-end please try below code –

<?php
/**
* Template Name: Basic Test
*/
get_header();

if ( have_posts() ) : 
    while ( have_posts() ) : the_post();
       the_title();
    endwhile;
else :
    _e( 'Sorry, no posts matched your criteria.', 'textdomain' );
endif;

get_sidebar();
get_footer();
?>