Near-infrared observations of the Fornax dwarf galaxy. I. The red giant branch