I saw this a couple years ago so hopefully this will help you fix yours.
Kubota makes a nipple for repairing this on BX models. p/n 15241-32290
The solution is to order a pipe joint from Kubota! The P/N is 15241-32290. One end is M18X1.5 and the other fits the hydraulic oil filter. Now for the nerve wracking part - Cut off the aluminum filter nipple as close as possible to the flange, I used a Dremil with a fiberglass reinforced cutoff wheel. Drill out the existing hole to 21/32". You drill it about 1" deep (mark the bit with tape), you will know when you are deep enough when you see the hole open into the oil cavity behind the nipple. The top of the hole will be into the cavity the bottom will have metal left over - this will be obvious as you drill. Remember to coat the bit with grease so you pull out most of the chips. It is critical to drill the hole as square as possible, too much of an angle and the filter will not sit square enough to seal. I eye balled it and it worked, no fancy tools required. You should now make sure that any remaining nipple is shaved off even with the back plane, I used a sharp wood chissel, works fine on aluminum. Next you tap the hole, I used a 4 flute tap. Once all the metal debris creating steps are done you should pull the caps off the oil filter chambers (allen head caps to the left of the filter). The upper one is 6mm the lower is 8mm allen - there is a spring behind the lower one), flush out with brake clean. Now screw in the Kubota nipple using high temperature red loktite on the threads. You can tighten the nipple using a 24mm socket. Screw on the new filter, fill with oil, modify the existing shield to encase the oil filter ( prevent anything from hitting it in the future) and you are done. I realize that pictures would really help this description but I was not thinking of posting this while I was doing the job.