The Shulhan Aruch (Orah Haim 219:3) stipulates that Birkat Hagomel must be recited before ten men, and that two among the ten have to be Talmide Hachamim, Torah scholars. The basis for this requirement is a verse in the chapter of Tehillim upon which Birkat Hagomel is founded, (Tehillim 107:32): “And they shall exalt Him in an assembly of people, and in a sitting of elders, praise Him.” An “assembly of people” refers to to ten men, and the Mishna Berura (O.H. 219:7) says that “elders” refers to Torah scholars. One suggested reason for including Torah scholars is that they have a fuller appreciation of the handiwork of Hashem and of the miracles He performs.
As such it is advisable to seek out a Minyan which includes at least two Talmide Hachamim when reciting Birkat Hagomel.
Indeed, Rabbi Ben Zion Abba Shaul (Or LeZion, vol. II, ch. 14, § 42) rules that if one has the choice to recite the blessing in a Minyan in a synagogue while the Torah is out versus saying it in a Bet Midrash without the Sefer Torah, one should choose the latter as it is a place filled with Torah scholars and Torah study. Nevertheless, Rabbi Ovadia Yosef (Yabia Omer, vol. III, Orah Haim, § 16) says that reciting Birkat Hagomel before Talmide Hachamim does not come at the expense of reciting it as soon as possible, namely, within three days. In other words, if one has the opportunity to recite the blessing immediately in front of a Minyan that has no Tamlmide Hachamim, one should do so.
Summary: Reciting Birkat Hagomel within three days supersedes reciting it in front of Talmide Hachamim after three days. Reciting it in front of Talmide Hachamim supersedes reciting it in front of a Minyan that has no Talmide Hachamim, but that has taken out the Sefer Torah.