I thought of the Nibble tool in the ESRI Spatial Analyst software but you specified the qgis tag. I found this solution using GDAL that is similar to Nibble which eats away at the NoData filling it in with valid neighboring pixels ...
So referencing a gis.stackexchange post titled How to set all pixels with value <= 0 to “nodata” in DEM raster? you can convert the landcover classes that are forest to NoData (Step 1) and then use the GDAL "Fill NoData" tool (Step 2).
The stackexchange link says ...
"I didn't find a one-tool solution, but you can first use raster calculator to turn all values below a certain threshold to zero and then use gdal_translate with -a_nodata 0 to turn the 0 into nodata."
I think an expression like ("landcov" <> 41) * "landcov"
might work to convert a single class to 0 (but I'm not super familiar with the syntax).
Now for "Step 2".
The GDAL Fill NoData Tool uses a syntax like this ...
gdal_fillnodata.py [-q] [-md max_distance] [-si smooth_iterations]
[-o name=value] [-b band]
srcfile [-nomask] [-mask filename] [-of format] [dstfile]
which in its simplest form appears to be as easy as gdal_fillnodata RASTER
where RASTER is the name of your landcover raster.