When you read a few verses above it you see the context. This passage is talking about a free will offering, vow offerings, and not giving diseased/abused animals to be sacrificed.
21 When a man presents a peace offering to the LORD from the herd or flock to fulfill a vow or as a freewill offering, it must be without blemish or defect to be acceptable. 22 You are not to present to the LORD any animal that is blind, injured, or maimed, or anything with a running sore, festering rash, or scab; you must not put any of these on the altar as an offering made by fire to the LORD.
23 You may present as a freewill offering an ox or sheep that has a deformed or stunted limb, but it is not acceptable in fulfillment of a vow. 24 You are not to present to the LORD an animal whose testicles are bruised, crushed, torn, or cut; you are not to sacrifice them in your land.
As I look at different translations of this verse a lot of them say the testicle of an animal and when you read commentaries on it it’s said that God was prohibiting the emasculation of animals.
Ellicott’s Commentary for English Readers
(24) That which is bruised, or crushed, or broken, or cut.—These four terms express the four ways which the ancients used to emasculate animals.
Neither shall ye make any offering thereof in your land.—Better, and this shall ye not do in your land; that is, not only are animals thus mutilated prohibited as offerings for the altar, but this practice of gelding is altogether forbidden to the Israelites with regard to any animal whatsoever throughout the country. This law is binding upon the orthodox Jews to this day, and the question has recently been discussed by some of their spiritual guides, since it seriously affects those of their community who are engaged in farming land.
I don’t believe Jesus was emasculated in this way during his way to be crucified. You also have to consider that God didn’t want animals were damaged prior to sacrifice. Jesus wasn’t damaged prior to his process of sacrifice in my eyes because from the moment he was arrested to the moment he died that entire process was his sacrifice. And everything he went through was symbolic in one way or another. Just my thoughts on it, but I’m sure others more knowledgeable will answer as well.