Nuclear absorption of a J/ψ meson during its formation