As fev says, "within" pretty clearly means that there is some range of time in which you must fill out the form. The potential ambiguity is because in "within 10 days before the flight", the following noun phrase "10 days before the flight" has a form that would generally cause it to be interpreted as a point in time rather than a range.
Meaning of "within" in this sentence:"The form must be filled out ...
Within is regarded as specifying an upper limit: within two days means maybe today, maybe tomorrow, but no later than two days from now. In is sometimes regarded as more precise: in two days could mean two days from now – particularly with a scheduled event, such as a party. That said, there are exceptions where the word in can be more ambiguous. If I tell my supervisor on a Monday: Boss, I ...
"Within" and "in" when referring to time - English Language & Usage ...
Within within (wɪˈðɪn) prep in; inside; enclosed or encased by before (a period of time) has elapsed: within a week. To avoid confusion, you should probably provide a particular timescale or else outline specifically that it will be done after 100 days but before 200 days.
In 2-3 days vs Within 2-3 days - English Language & Usage Stack Exchange
24 Within is closer to inside - it mainly refers to something like a building where you are physically in (or inside). In can also mean a state or an organisation, so you can be "in trouble", or "in school" but not "within trouble".
The preposition "within" takes a length of time as an object. "14 days" is a length of time. It also takes an optional "of"-phrase which indicates the start of the length of time.