A frustration-free local Hamiltonian has the property that its ground state minimises the energy of all local terms simultaneously. In general, even deciding whether a Hamiltonian is frustration-free is a hard task, as it is closely related to the QMA1-complete quantum satisfiability problem (QSAT) -- the quantum analogue of SAT, which is the archetypal NP-complete problem in classical computer science. This connection shows that the frustration-free property is not only relevant to physics but also to computer science. The Quantum Lovász Local Lemma (QLLL) provides a sufficient condition for frustration-freeness. A natural question is whether there is an efficient way to prepare a frustration-free state under the conditions of the QLLL. Previous results showed that the answer is positive if all local terms commute. In this work we improve on the previous constructive results by designing an algorithm that works efficiently for non-commuting terms as well, assuming that the system is "uniformly" gapped, by which we mean that the system and all its subsystems have an inverse polynomial energy gap. Also, our analysis works under the most general condition for the QLLL, known as Shearer's bound. Similarly to the previous results, our algorithm has the charming feature that it uses only local measurement operations corresponding to the local Hamiltonian terms.