Yes, if sloths are available, jaguars will feed on them. The jaguar’s diet reflects the relative abundance of prey species in the area in which they live, which naturally varies from area to area. Jaguars are opportunistic predators. They are capable of killing and eating almost any type of prey they encounter. The list of prey animals eaten by jaguars is very long. It’s reported that more than 85 prey species are eaten by jaguars.

One area where jaguars eat sloths is in the rainforest of La Selva Biological Station and Reserve. It is located in the Caribbean lowlands and covered by tropical pre-montane wet forest which is also called rainforest. In this 50 km rainforest both sloths and iguanas are prominent in the jaguar’s diet (Source: H.E.Braker and H.W. Greene: Population biology: Life histories, abundance, demography, and predator-prey interactions. In La Selva: Ecology and natural history of a Neotropical rainforest. Chicago Iniversity Press).
Sloths protect themselves by remaining in the canopy of the rainforest the majority of the time, coming down about once a week to urinate and defecate. Living in the trees they are protected naturally from predators such as jaguars and eagles. Sloths move slowly as we know and on average about 41 yards per day. Their static and slow-moving lifestyle help to protect them as they become almost invisible in the canopy of the rainforest. The biggest threat to the sloth is not a predator like a jaguar but the vulnerability of the forest to deforestation by commercial human activities. Loss of wildlife habitat is the world’s biggest threat to both all wild cat species and their prey.
Both the jaguar and the sloth are threatened by the world’s most dangerous predator, the human. Humans are superpredators but not “considered” apex predators.