I honestly cannot understand what this has to do with free will.
Free will is hard to define, but roughly the philosophical definition is independence from external physical influences. If we have free will, then we are by default independent from these influences. Then, if we are told that certain actions will incur punishment, which is an external physical influence, nothing changes at all.
Suppose you get a glass of water and want to drink it. If you have free will, then it is your independent decision to drink it. Then, suppose I tell you than though the water will quench your thirst, I put something in it to make it taste very bad. If you had free will before I told you about this "punishment", you will still have it afterward: it is still completely your decision. Knowledge of punishment is merely a factor in this decision - if you have free will from other influences, then this one too will not determine your choice in any way. There's nothing special about punishment that makes it more physically determinant than everything else in the world.
Thus, whether God punishes us has nothing to do with free will. We either have it or we don't, and in either case punishment plays no role in determining our freedom.