Nonlinear mechanical response of finite-length soft composites with random dislocations