It is similar to buffer analysis that we do for Vector but if it’s done for Raster then it is called proximity.
Since, there will be distance measurement make sure that your data is in a coordinate system which has units meter. Here I will be using WGS84 44N.
Follow the following steps
Step1: Load your raster in QGIS simply by dragging it to layer panel like below.
Step2: Go to Processing toolbox search for ‘Proximity’ under Raster analysis of GDAL section you will get ‘Proximity (raster distance)’ double lef click it to get below interface.