Representations of the Drazin inverse for a class of block matrices