Living with chronic disease is absolutely one of risk factors. In particular, that's one of the risk factors for suicide.
There are a lot of physical illnesses that people experience as they age, but we also see psychosocial factors, such as bereavement, with the loss of partners and friends, and the loss of independence and autonomy. A lot of these life transitions that are more common to later in life are what we see as some of the risk factors for depression, in addition to the biological risk factors that we all have at any age.