If you want to write church music for a church, I would say that you probably don’t need a PhD to do that. A PhD is a scholarly/research-based degree; in music, you’d need one if you wanted to teach music at the college level or do scholarship on music at a research institution. If you want to compose church music as a religious leader, a master’s in music is probably your better bet.
Boston University has a Master’s of Sacred Music, a joint effort between their schools of music and theology - you learn to be a leader in a faith community and the program is designed to produce professional church musicians.
Other programs in church or sacred music are at Yale, Baylor, Catholic University of America, Claremont Graduate University, East Carolina University, Duquesne, Emory, Florida State, Indiana, Liberty University (which is in VA), Mercer University, Northwestern, Samford, Santa Clara, Shenandoah University (also in VA), University of Florida and University of Notre Dame. There are also a lot of theological seminaries that offer programs in church music. Here’s a list: https://www.agohq.org/wp-content/uploads/2013/08/GraduateChurchMusicPrograms.pdf
You’ll have to decide whether you want to go to a secular university or a more religious program. A program like Yale’s or Emory’s will probably be more secular and non-denominational in nature. A program like Baylor’s or Liberty’s is likely to be much more religious, and Christian in nature. A seminary or theological school is probably even more religious, and will also concentrate on teaching you church leadership and religious texts - which it sounds like you want.