بسم الله الرحمن الرحيم
Ibadat (worship) especially salah is of great importance among all religious commandments. Hence it should be offered behind such imam who is pious, God-fearing, recites the holy Quran correctly and holds correct belief. One should avoid offering salah behind the imam of other maslak as per one’s capacity. If the beliefs of the dawati sect who wears greed turban as symbol are not like the beliefs of Ahl Sunnah al-Jamah then salah shall be makrooh behind such imam who is attached to this group. Your friends are right and they rightly guided you.
Allah knows Best!
Darul Uloom Deoband
This answer was collected from the official ifta website of Darul Uloom Deoband in India.