This propably sounds a bit dumb but how could the church kill all or almost all templars without them defending thereselves? They were an army or some sorts
Well they didn't kill all of them, the king of France executed three major leaders in the French sphere of influence. However the French monarchy did strong arm the Catholic Church into condemning the holy order for reasons that you should really look more into if you're interested. The Templars: Selected sources translated by Malcolm Barber and Keith Bate is a pretty good source. In any case the Vatican sent a Papal Bull to every individual king or authority that harbored Templar headquarters and activity to arrest and try any leaders under heresy. Most kings didn't however follow the edict, either letting most of them go or absorbing them into other similar groups like the Knights Santiago or the teutonic knights. Officially however the templar knights were a heretical order according to the Catholic Church.