How long do you plan to work? How long is your mortgage.
You can usually buy level premium term for 15, 20, 25, 30, not longer (but all policies continue beyond the level premium but at MUCH higher rates).
If you think you'll have your full stash by 45 then 10 years might be enough, but price check. You might find 20 year is really not that much more expensive and you can always choose to end it earlier. This is probably more preferable to getting 10 and then realizing you need more at year 11 - you may no longer be insurable or the prices may be much higher due to higher age.