The answer is that if ZFC is consistent, then you cannot prove that the continuum function is injective in the way you request. This can be proved by forcing. In Cohen's original model of $ZFC+\neg CH$, he forced over a model of GCH to add $\omega_2$ many Cohen reals, and the result was $2^\omega=2^{\omega_1}=\omega_2$, which is a counterexample to your property.
It is also a consequence of Martin's Axiom that $2^\kappa=2^\omega$ for all $\kappa\lt\frak{c}$, and if one has MA plus $\neg CH$, this also means counterexamples to the property you mention.
Meanwhile, one can show by forcing that the injectivity of the continuum function is not equivalent to GCH, since by Easton's theorem, one can find a forcing extension (of any model of GCH) in which $2^{\aleph_n}=\aleph_{n+2}$ for every natural number $n$, and otherwise the GCH holds. Such a model exhibits your property, but does not satisfy GCH.