If $f\ $ is a monotonic function then the median value of $f(X)$ is the same as the function applied to the median value of $X$.
If there is no monotonicity (or approximate monotonicity) you wouldn't expect them to be even close: just think of $X$ being uniformly distributed on the interval and $f(x)=|x-1/2|$ say.
On the other hand, a reasonable condition for the mean of $f(X)$ to lie close to $f$ applied to the mean of $X$ is for $f\ $ to be close to a linear function (the same example as above shows the mean of the function being very far from the function of the mean). Of course the mean is very sensitive to extreme values of $f(X)$ whereas the median is not
In general for monotone or nearly monotone $f$, you can expect better closeness for the medians than the means. For seriously non-monotone $f$, I don't think there's anything useful you can say.
By the way, you didn't ask this, but in case you are interested in the *sample mean* and *sample median* of $f(X_1),\ldots,f(X_n)$ as compared to the true mean and median of $f(X)$, the first is typically errs by about std dev$(f(X))/\sqrt n$, whereas the latter errs by about $(1/\sqrt{8n})/\rho(m(f(X)))$ where $\rho$ is the density function of $f(X)$ (which I'm assuming exists). This means you can do a numerical test to see which of these will be closer.