Short answer is no, it won't work. The top rails of the CJ5 tub are a completely different shape from the CJ7/8 and about 2" shorter. That's aside from the issue of not having doors that would work. The lower bulkhead also wouldn't work in a CJ5 tub, so the half cab wouldn't have anything to seal against.
But the real question is why? There were steel half cabs available for CJ5's that can still be found. They're certainly no rarer than the only 26,000 Scrambler half cabs that were made, and much cheaper.
74 CJ5 complete frame off restoration
82 CJ8 Scrambler Laredo. 4.6L stroker AX15 D300.