Thank you Raramai and Zhihan for your solutions. Neither worked in isolation for me but works when combined both solutions.
I am using R version 4.4.0 on PC windows.
Step 1. create Surv() object to feed into coxph() function.
eg.
cx1 <- Surv(df$time_variable,df$censor_variable)
cox <-coxph(cx1~covariate1 + covariate2, data=df)
AND Step 2. use as.data.frame() function on data within the ggforest() function
eg. ggforest(cox,data=as.data.frame(df))
Thank you Mary for posting the initial question.