There is nothing within the Health Protection (Coronavirus) (Restrictions) (Scotland) Regulations 2020 which specifies any restriction upon distance for travel. It's the purpose of such travel which is all-important.
Section 5(1) states "Except to the extent that a defence would be available under regulation 8(4), during the emergency period, no person may leave the place where they are living".
The defence under Section 8(4) is one of 'reasonable excuse'. Section 8(5) provides a list of 'reasonable excuses' but it's non-exhaustive. (i.e. a person might still have a valid 'reasonable excuse', even though it's not included within the list):
"(a) to obtain basic necessities, including food and medical supplies for those in the same household (including any pets or animals in the household) or for a vulnerable person and supplies for the essential upkeep, maintenance and functioning of the household or the household of a vulnerable person, or to obtain money,
(b) to take exercise, either alone or with other members of their household,
(c) to seek medical assistance, including to access any of the services referred to in paragraph 37 or 38 of schedule 1,
(d) to provide care or assistance to a vulnerable person, including to provide emergency assistance,
(e) to donate blood,
(f) to travel for the purposes of work or to provide voluntary or charitable services, where it is not reasonably possible for that person to work, or to provide those services, from the place where they are living,
(g) to attend a funeral of—
(i)a member of the person’s household,
(ii)a close family member, or
(iii)if no-one within sub-paragraphs (i) or (ii) are attending, a friend,
(h) to fulfil a legal obligation, including attending court or satisfying bail conditions, or to participate in legal proceedings,
(i) to access critical public services, including—
>(i) childcare or educational facilities (where these are still available to the child in relation to whom that person is the parent of, or has parental responsibility for or care of, the child),
>(ii) social services,
>(iii) services provided by the Department of Work and Pensions,
> (iv) services provided to victims (such as victims of crime),
(j) in relation to children who do not live in the same household as their parents, or one of their parents, to continue existing arrangements for access to, and contact between, parents and children, and for the purposes of this paragraph, “parent” includes a person who is not a parent of the child, but who has parental responsibility for, or who has care of, the child,
(k) in the case of a minister of religion or worship leader, to go to their place of worship,
(l) to move house where reasonably necessary,
(m) to avoid injury, illness or to escape a risk of harm"