Papaya is a fruit that grows on a tree and therefore should, at first glance, require the Beracha generally recited over fruit that grow on trees – "Bore Peri Ha'etz." Even though the papaya tree differs externally from other trees in that the trunk is hollow and it has no branches, nevertheless, it essentially resembles a tree, and one would therefore expect that it would require the Beracha of "Ha'etz."
The Ben Ish Hai (Rabbi Yosef Haim of Baghdad, 1833-1909), however, in his collection of responsa entitled Rav Pe'alim (vol. 2, Orah Haim 30), rules that before eating papaya one recites the Beracha of "Bore Peri Ha'adama." He claims that despite the general resemblance between the papaya tree and standard fruit trees, the papaya tree differs in that it begins producing fruit the same year in which it is planted. This quality is characteristic of vegetables, not fruits, and therefore with respect to Berachot we should classify papaya as a vegetable. The Ben Ish Hai cites the work "Hesed Le'Avraham" (authored by the grandfather of the Hid"a) as documenting the espousal of this theory by Rav Yosef Karo Z"L and Rabbi Haim Vital Z"L. The "Hesed Le'Avraham" writes that he heard firsthand testimony that these two sages would recite "Bore Peri Ha'adama" over eggplant because the eggplant tree yields fruit the same year in which it is planted. The Ben Ish Hai applies this rule to the case of papaya and thus concludes that one who eats papaya should recite the Beracha of "Bore Peri Ha'adama."
This is indeed the ruling of Rabbi Moshe Halevi (Israel, 1961-2001), in his work Birkat Hashem (vol. 3, 3:20). He adds, however, that if one mistakenly recited "Bore Peri Ha'etz," he has nevertheless fulfilled his obligation and should not then recite the Beracha of "Bore Peri Ha'adama."
Summary: Before eating papaya one should recite the Beracha of "Bore Peri Ha'adama"; however, if he mistakenly recited "Bore Peri Ha'etz" he has nevertheless fulfilled his obligation.