How To Use htaccess to Rewrite Link Structure for a Page that is Generated Programatcially

You’re looking to remove a post-type slug completely from the url. This is documented in this answer. Remember that after making any changes to post urls, you should resave your permalink structure for the changes to fully take effect.

Edit:
You can additionally redirect from the old location (with the slug), this way:

function na_redirect_slug_requests() {
    $post = get_queried_object();

    // If our custom-post-type
    if ( ! empty( $post->post_type ) && 'events' === $post->post_type ) {
        $url = get_permalink( $post );

        // And the custom-post's url doesn't match the one we're looking at...
        if ( false === strpos( $url, $_SERVER['REQUEST_URI'] ) ) {

            // Then let's redirect.
            wp_safe_redirect( $url, 301 );
            exit;
        }
    }
}
add_action( 'template_redirect', 'na_redirect_slug_requests', 10, 50 );

Just remember to replace “events” with your custom post type slug.