All health insurers, both public and private, may increase their premiums due to general rising costs of medical services and technologies. They can not simply increase the premium though—they must justify the increase and comply with the law in order to get a premium increase approved. Private insurance premiums have risen on average around 2.8% a year since 2004, while public insurance premiums have risen by around 3.2% annually in the same period.
Premium development private health vs public health insurance
Source: Wissenschaftliches Institut der PKV
Source: Wissenschaftliches Institut der PKV
While this means that your health insurance will get more expensive as you get older, it is not directly tied to your individual age. Once you're registered for a policy, your insurer is not allowed to increase your premiums based on your age or changes to your health status (e.g. if you are diagnosed with a chronic disease).
For private insurance to keep premiums stable, a portion of your monthly payment is placed in an "ageing reserve" fund. This is what distinguishes German insurers from providers elsewhere in the world, who are generally not required to do this.