I'd ask a local trans shop if the swap is possible. They are different generations.
Search Mazda B-Series Pickup Questions
Mazda B-Series Pickup Experts
Related Models For Sale