Q. Are we allowed to sing melodies in schul that were sung in a church as part of the service?
A. Sefer Chasidim (238) prohibits singing to Hashem the music or songs that are performed for avoda zara and idolatry. Mishna Berura (53: 82) quotes Mogen Avrohom's interpretation on shirei agobim, that the Remah (ibid. 25) forbids, as being the songs that Gentiles sing in their temples to their avoda zara. He also quotesTeshuvos HaBach (end of 127) who limits the prohibition to the ones performed as a dedicated and designed presentation to them.
Igrois Moshe (Y.D. 2: 56 &110) prohibits listening on the radio and similar, to melodies that Gentiles once played or sang in their churches, even if they are not in use today. Since the proscription is severe, he maintains that it applies even when one's living and profession depends on them. He debates whether the proscription is Biblical or Rabbinic.
However, Bnei Banim (3: 35 also in Divrei Halacha p. 10), is lenient when one listens to it only occasionally and without any religious interest or intent.
Poskim voice different opinions in regards to music and nigunim that were somewhat or significantly changed from the original.
Horav Shlomo Miller's Shlit'a opinion is that one should be stringent and avoid this type of music and songs in Shul.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a