Application of the confluent Heun functions for finding the quasinormal modes of nonrotating black holes