A method of preparing Compound (1) or a pharmaceutically acceptable salt thereof: comprises: (a) reacting Compound (X): a pharmaceutically acceptable salt thereof with Compound (Y): in the presence of a palladium catalyst and a carbonate or phosphate base to form compound (Z): or a pharmaceutically acceptable salt thereof; and (b) deprotecting the Ts group of Compound (Z) to form Compound (1) or a pharmaceutically acceptable salt thereof.