Police: Man with gun arrested, tells officers he was on his way to a church to fulfill a prophecy