In distributed device-to-device (D2D) communications, no common reference time is available and the devices must employ distributed synchronization techniques. In this context, pulse-based synchronization, which can be implemented by distributed phase-locked loops is preferred due to its scalability. Several factors degrade the performance of pulse-based synchronization, such as duplexing scheme, clock skew and propagation delays. Furthermore, in distributed networks, devices should be aware of the synchronization status of others in order to initiate data communications. To address these prevailing issues, we first introduce a half-duplex timing-advance synchronization algorithm wherein each device alternates between being a transmitter and receiver in their exchange of synchronization pulses at each clock period. Based on this algorithm, we propose a novel fully-distributed pulse-based synchronization protocol for half-duplex D2D communications in 5G wireless networks. The protocol allows participating devices to become aware of the global synchronization status, so that they can complete the synchronization process ideally at the same time and proceed to data communication. In simulation experiments over multi-path frequency selective channels, the proposed synchronization protocol is shown to outperform a benchmark approach from the recent literature over a wide range of conditions, e.g., clock skew, number of devices, and network topology.