A radiation image processing device comprising: at least one processor, wherein the processor is configured to acquire an imaging condition in a case in which a radiation image of a subject is acquired by a radiation detector detecting radiation transmitted through the subject in a state in which an object is interposed between the subject and the radiation detector, derive a body thickness distribution of the subject based on the radiation image and the imaging condition, acquire a primary ray transmittance and a scattered ray transmittance of the object in accordance with the body thickness distribution, derive a primary ray distribution and a scattered ray distribution of the radiation detected by the radiation detector by using the imaging condition, the body thickness distribution, and the primary ray transmittance and the scattered ray transmittance of the object, and derive an error between a sum of the primary ray distribution and the scattered ray distribution and a pixel value at each position of the radiation image, update the body thickness distribution such that the error is smaller than a predetermined threshold value, and repeat acquisition of a primary ray transmittance and a scattered ray transmittance of the object based on the updated body thickness distribution and derivation of the primary ray distribution and the scattered ray distribution. at least one processor, wherein the processor is configured to acquire an imaging condition in a case in which a radiation image of a subject is acquired by a radiation detector detecting radiation transmitted through the subject in a state in which an object is interposed between the subject and the radiation detector, derive a body thickness distribution of the subject based on the radiation image and the imaging condition, acquire a primary ray transmittance and a scattered ray transmittance of the object in accordance with the body thickness distribution, derive a primary ray distribution and a scattered ray distribution of the radiation detected by the radiation detector by using the imaging condition, the body thickness distribution, and the primary ray transmittance and the scattered ray transmittance of the object, and derive an error between a sum of the primary ray distribution and the scattered ray distribution and a pixel value at each position of the radiation image, update the body thickness distribution such that the error is smaller than a predetermined threshold value, and repeat acquisition of a primary ray transmittance and a scattered ray transmittance of the object based on the updated body thickness distribution and derivation of the primary ray distribution and the scattered ray distribution. acquire an imaging condition in a case in which a radiation image of a subject is acquired by a radiation detector detecting radiation transmitted through the subject in a state in which an object is interposed between the subject and the radiation detector, derive a body thickness distribution of the subject based on the radiation image and the imaging condition, acquire a primary ray transmittance and a scattered ray transmittance of the object in accordance with the body thickness distribution, derive a primary ray distribution and a scattered ray distribution of the radiation detected by the radiation detector by using the imaging condition, the body thickness distribution, and the primary ray transmittance and the scattered ray transmittance of the object, and derive an error between a sum of the primary ray distribution and the scattered ray distribution and a pixel value at each position of the radiation image, update the body thickness distribution such that the error is smaller than a predetermined threshold value, and repeat acquisition of a primary ray transmittance and a scattered ray transmittance of the object based on the updated body thickness distribution and derivation of the primary ray distribution and the scattered ray distribution.