Hi,
there is no requirement regarding the distance from educational institution to your home, BUT the A-kasse will make an assesment in every case, and decide if they think you have been really living in Denmark. However I will think that 2 hours of transport is what you can call within the normal.
Many danes travel long for studies and work.
But be aware that the A-kasse can demand some extra proof from you, if they think it is only a proforma address.
Best regards,
Anders, www.a-kasser.dk