Nuclear power replaced coal in Germany, not gas. A big dependence exists because people heat their homes with gas and lots of industry needs gas, nuclear doesn’t help with either.
But Germany wanted the cheap gas, so they ignored the risks and Russia ultimately invaded Ukraine.
But regarding gas, one has to understand that a tiny fraction (15%) of gas is used for electricity and most for heating. So nuclear power is completely irrelevant here.
I also would like people realize that many nuclear plants in Europe and elsewhere still depend on fuel from Russia. So energy dependence is a bit more complex.
You know that homes can be heated with electricity from nuclear power? The reason why Germany uses gas for heating is because it was historically very cheap compared to electricity, because it came from Russia. Good, while the attached strings could be ignored..