Updated: There is only one available hook before checkout billing fields that you can use to add custom fields in checkout form. Try this complete code:
add_action( 'woocommerce_checkout_before_customer_details', 'custom_checkout_fields_before_billing_details', 20 );
function custom_checkout_fields_before_billing_details(){
$domain = 'woocommerce';
$checkout = WC()->checkout;
echo '<div id="my_custom_checkout_field">';
echo '<h3>' . __('My New Fields Section') . '</h3>';
woocommerce_form_field( '_my_field_name', array(
'type' => 'text',
'label' => __('My 1st new field', $domain ),
'placeholder' => __('Please fill in "my 1st new field"', $domain ),
'class' => array('my-field-class form-row-wide'),
'required' => true, // or false
), $checkout->get_value( '_my_field_name' ) );
echo '</div>';
}
// Custom checkout fields validation
add_action( 'woocommerce_checkout_process', 'custom_checkout_field_process' );
function custom_checkout_field_process() {
if ( isset($_POST['_my_field_name']) && empty($_POST['_my_field_name']) )
wc_add_notice( __( 'Please fill in "My 1st new field".' ), 'error' );
}
// Save custom checkout fields the data to the order
add_action( 'woocommerce_checkout_create_order', 'custom_checkout_field_update_meta', 10, 2 );
function custom_checkout_field_update_meta( $order, $data ){
if( isset($_POST['_my_field_name']) && ! empty($_POST['_my_field_name']) )
$order->update_meta_data( '_my_field_name', sanitize_text_field( $_POST['_my_field_name'] ) );
}
Code goes in function.php file of your active child theme (or active theme). Tested and works.
You will get a new field section with yours new custom field (where you can have many also):

Official reference docs: Customizing checkout fields using actions and filters