Given that ethereum continues to run for few years, is it safe to assume that the smart contract will hold the ether that was deposited into it for years until its triggered to transfer/withdraw the amount ? Also, Can it be triggered after a few years to withdraw the amount of ethers it holds ?
As long as the Ethereum network is working, the Ether stays there unless it's withdrawn. There is no reason for it to not stay there.
That's one of the beautiful parts about smart contracts - they are guaranteed to function as intended "forever" and their functionality is transparent.
So, yes, you can call the function just the same way in a few years as you'd call it today. Of course the environment will get better meanwhile and tools will improve but the contract will stay exactly as it is.