I presumed chimpanzees were the closest relatives of us. However, after watching this TED Talk, it seems bonobos are closer to us both in skeleton and behavioral similarity than chimpanzees. I once read in The Magic of Reality that we share quite a lot of common FOXP2 gene letters with chimpanzees, but there isn't any mention on similarity between us and bonobos in that book. Here is the excerpt:

You can tell that FoxP2 is the same gene in all mammals because the
great majority of the code letters are the same, and that is true of
the whole length of the gene, not just this stretch of 80 letters. Of
the total of 2,076 letters in FoxP2, the chimpanzee has 9 letters
different from ours, while the mouse has 139 letters different. And
that pattern holds for other genes too. That explains why chimpanzees
are very like us, while mice are less so. Chimpanzees are our close
cousins, mice are our more distant cousins. 'Distant cousins' means
that the most recent ancestor we share with them lived a long time
ago.

Monkeys are closer to us than mice but further from us than
chimpanzees. Baboons and rhesus macaques are both monkeys, close
cousins of each other, and with almost identical FoxP2 genes. They are
exactly as distant from chimps as they are from us; and the number of
DNA letters in FoxP2 that separate baboons from chimps is almost
exactly the same (24) as the number of letters that separate baboons
from us (23).

4 Answers
4

Others have given great answers, so I'll just support their answers with this diagram and a little further background on how to think about relatedness in evolutionary context.

Since the author in this excerpt makes no mention of Bonobos, I would imagine that, by chimpanzee, he really meant the genus Pan, which includes both Bonobos and Common Chimps. But that does not necessarily matter.

Relatedness, in modern taxonomy, depends purely on common ancestry, not necessarily on similarity of specific traits. As others have explained, we make theories about ancestry relationships based on many criteria and logic, not just variation in one gene. In this tree, you should think of A, B, and C as theoretical, extinct common ancestors of the species below them in the tree. The list of apes at the bottom represent the relevant extant species species only. Bonobos and Common Chimps have a more recent common ancestor (C) than either Bonobos and Humans (B) or Common Chimps and Humans (B). This is why @mgkrebs said that both qualify equally as most closely related, because the common ancestor of each pair is the same.

Few would disagree that Bonobos do seem to be more similar to humans than Chimps are to humans, but that actually does not mean they are more closely related evolutionarily! Theoretically there are two ways this could happen even if Bonobos and Chimps are equally related to humans, either our common ancestor with Chimps and Bonobos also shared the traits we have in common with Bonobos and Chimps changed, or Bonobos and Humans happened to develop these similarities independently. The former is a simpler explanation, but either are possible for each similarity. Again, the key in understanding this is in thinking about the theoretical ancestor species, B and C. The only way Humans could be more closely related to Bonobos than chimps is if the common ancestor, B, was a descendant of C, which seems extremely unlikely and as far as I know is not supported by the genetic research in this area.

Our common ancestor with Gorillas (A) on the other hand is much "earlier" than our common ancestor with Chimps and Bonobos, so Gorillas are less closely related to use than the group containing Bonobos and Chimps.

Looking at one gene is not enough. Since each gene is free to evolve (or not), there can be different sister taxon relationships depending on the gene studied. A better estimate is made using several genes or combining the results of several analyses.

According to Purvis (1995), the extant sister taxon of Homo sapiens is a clade with the bonobo (Pan paniscus) and chimpanzee (Pan troglodytes), with gorillas as an outgroup.

Chimpanzees and bonobos are equally close to us in time (which is the opportunity for evolutionary divergence). Our most recent common ancestor with either species is the same, as our line split from their common line about 6 million years ago (estimates are generally in the 4-8 mya range).

So in terms of general closeness to us, these two species qualify equally. For any particular gene, either one might be closer, as our version may be unchanged from our common ancestor, while one of the two Pan (chimp) species may be the same and one different. For most genes that have differences, we can expect that we are the odd man out, while the two Pan species share a common gene.

I'm don't have enough experience with this particular area to know whether experts have come to a consensus about this (although both your question and a brief literature search suggests they have not). What I do know is that when you begin looking at these types of questions at this level of detail, the answer that you get will depend on the characters used and the modeling strategy. The fact that you may arrive at a different conclusion when looking at a small number of morphological (skeletal) and behavioral characters versus genetic characters (sequence homology of a particular family of genes) is not surprising. Even when using the same characters, different methods (maximum parsimony vs maximum likelihood vs Bayesian) may give you different results.

So the answer is probably "we don't know for sure" (I'd be happy to be proven wrong here). But either way, the different conclusions you cite are not necessarily contradictory. Any conclusion will simply have to be justified in terms of the assumptions made, the data (characters) involved, and the method used.