If the first names were clearly masculine and feminine, then the "him" would refer to the masculine person. However, I cannot be sure of the gender to either Dill or Jem.
In order to answer your question, I need some context. What specific book, movie, or story are you referring to? Once I have that information, I can explain how to get the answer to your question.