Speaking to Reuters on the sidelines of the UN Ocean Conference in Lisbon, Kerry said Russia has been using energy as a weapon and would continue to do so in the future but Europe was committed to put an end to its dependency.
"It's a warning to everybody that you do not want to be prisoners of petrostate dictators who are willing to weaponize energy," Kerry said.
Russia launched a large-scale invasion of Ukraine on February 24 this year, which Moscow calls a "special operation".
Kerry said the world was "running out of time" to tackle climate change but governments should not use the war in Ukraine as an excuse to delay the process even further.
"We have seen people choosing short-term (solutions) in order to respond to the challenge of losing gas for Russia," he said.
"And we cannot allow the war in Ukraine to alter the reality that we need to reduce emissions and we need to deal with speeding up the transition to alternative renewable energy."
Soaring energy costs and supply shocks triggered by the Russian invasion have spurred some countries to bet more on renewables but others to burn more coal, buy up non-Russian gas or pause efforts to reduce fossil fuels.
The European Union (EU) relied on Russia for 40% of its gas before Moscow invaded Ukraine.
"We have to make up some gas for Europe, which the US will work to do with others, but it has be a one for one replacement - not a whole series of new infrastructure with a 20- or 30-year horizon because that will crush the ability to respond to the climate crisis," he said.
He added, "We do not need to have new liquefied natural gas projects that require new drilling."
Germany drew criticism from the United States and others, including EU member states, for supporting the planned Nord Stream 2 gas pipeline, designed to deliver Russian gas directly to Germany. The project was halted two days before the invasion started.
Kerry said it was not worth "going backwards" and described the European Union as a "terrific leader" on renewable energies that has set higher goals than many other countries in the world.