Nigerian troops have rescued 31 worshippers abducted during Easter services in Kaduna state, the military said, following an attack that left several people dead.