Synthesis methods for heterocyclic drug compounds