My data on cancer patients spreads over 18 years. The first nine years the patients are diagnosed with a CT scan. Then PETCT becomes approved. I want to do a survival analysis(Kaplan-Meier) and a comparison of the two different treatments. The event is death(the cancer is esophageal). I'm censoring patients that are still alive. However the earlier group have had an opportunity to live longer. Will censoring be enough the eliminate this bias?
Yes, it will eliminate "bias" of non-equal follow-ups.
However the earlier group have had an opportunity to live longer.
This is not quite true because censoring patient from PETCT group at 9 years, means that you know that he/she lived 9 years or longer. And censoring patient from CT group at 18 years, means that you know that he/she lived 18 years or longer. Both could live 100 years, so you do not give "the earlier group an opportunity to live longer", you just measure their life length more precisely.
Varying precision of measurement may cause a bias, of course. You can run your analysis with CT group censored at 9 years, to make follow-ups of two groups identical, and compare it's results with analysis with CT group censored at 18 years, to jugde the magnitude of this bias.
However, I think, there is more severe bias, you can not eliminate with censoring. One of your groups started their treatment 9 years earlier than the other. Can you ensure that care standards, quality of drugs etc. did not change within those 9 years? In other words, are you sure that you can compare first 9 years of CT use with first 9 years of PETCT use (which is years 10-18 of CT use)?
If not, I'd recommend using only data from patients you collected from the start of PETCT use.