You should get a 44 series Briggs. Very common but very good. Your engine has a 40xxxx model, so its a 40 series. You want a 44 series with a 44xxxx model number. Make sure the shaft size is the same.
Briggs & Stratton 22HP Professional Series 44S677-0027-G1 724cc V-Twin Engine. Starts and runs great. Tested for 1 hour before removal. Engine has just over 300 hours.
That would be perfect but you have to measure your pto shaft. What's your Husqvarna model? Deck size? If you want to buy a $700 engine, go ahead, but I would assess your riding mower's value. Is it worth putting an expensive engine in?