Please wait

Exhibit 23.4

Graphic

Gaffney, Cline & Associates, Inc.

14990 Yorktown Plaza Dr

Houston, TX 77040

April 23, 2025

Fidel Delgado Loria

Gerente de Reservas

Ecopetrol S.A.

Carrera 13 No. 36 - 24

Bogotá, D.C.

Colombia

Dear Sir,

Consent of Gaffney, Cline & Associates

As independent reserves engineers for Ecopetrol S.A. (Ecopetrol), Gaffney, Cline & Associates (GaffneyCline) hereby confirms that it has granted and not withdrawn its consent to (i) the references to GaffneyCline and to the inclusion of information contained in our third-party letter report entitled Reserves Statement of Certain Fields, Colombia, as of December 31, 2024, dated January 31, 2025, prepared for Ecopetrol, and to the annexation of our report as an exhibit in Ecopetrols annual report on Form 20-F for the fiscal year ended December 31, 2024; and, (ii) incorporation by reference of this consent and our report into Ecopetrol S.A.s registration statement on Form F-3 filed with the United States Securities and Exchange Commission on April 19, 2024 (the Registration Statement).

Yours sincerely,

/s/ Fernando Rolla

Project Manager

Fernando Rolla, Senior Advisor

Graphic