"Whether, not whether"
The comments explained it pretty well, but to just lay it out in one place:
Whether is used to introduce alternatives, separated by "or".
It does not matter whether you have high or low grades in this university.
Sometimes the second alternative is not mentioned, just implied. You can infer the second alternative to mean the opposite of the first one.
It does not matter whether you have high grades in this university.
In your example sentence, there are two whether-clauses. One of them gives two alternatives (a reference refers to a const type, or to a nonconst type). The second has the second alternative implied. Adding an explicit "or not" can help to unravel it better:
Whether a reference refers to a const or nonconst type affects what we can do with that reference, not whether we can alter the binding of the reference itself or not.
Without using any whether, it could be reworded to:
A reference can refer to a const or to a nonconst type. That affects what we can do with that reference, not the possibility of altering the binding of the reference itself.