I want to pile on the keep riding vibes here.
My left knee is bone on bone with bad arthritis.I tore it up in a sports accident and had a major reconstruction surgery 30 years ago. I wear this baby on it 24/7 except when I am riding. Without the brace walking is painful.

My orthopedist wants to do a full knee replacement on me but says I am too young at just 47 to do it now. They only last about 20 years and if he does it now, at 67 I would need another one and the surgery is pretty hairy for a 67 year old. He will wait a few years and do it when I am in my 50's
Sounds pretty bad right?
Well that left knee is attached to a cyclist that rode 5 double centuries and 9 centuries this year. Pain free. I will have 6000 miles before the year is out.
+1 Get a good bike fit. I suggest a Specialized Body Geometry trained fitter. Mine did wonders for me.
Consider Speedplay pedals.
+1 Learn to spin.
Use easy gearing on hills. (I have a 50/34 compact crank with an 11-34 ten speed cassette)
Go for it!