How can i calculate the square of the norm of the variable vector?

You should be using square_pos, and it should work correctly. So something is screwed up or conflicting in your CVX installation or MATLAB session.

Try reinstalling a newly downloaded CVX 2.2 in a fresh MATLAB session.