Custom posts password protect

Use post_password_required() function to check if the post is protected.

<?php
global $post;

$p = $post; // can be post object.
// $p = $post->ID; // also can be post ID.

$this_post_type = get_post_type( $p );

if ( 'my_custom_post_type' === $this_post_type ) { // check the post type.

    if ( ! post_password_required( $p ) ) {
        // unprotected post loop here.
    } else {
        // protected post, show the password form.
        echo get_the_password_form( $p );
    }
}

If you use a custom template for this post type you can skip post type check.

However, the code above was not tested.