NY and CA, along with other states and orgs, filed a suit in No. Ca. on 4/4/2019. https://ag.ny.gov/sites/default/files/filed_pi.pdf and their argument is that PDJT does not have the statutory authority to use the forfeiture funds and that the DOD transfer to the anti-drug funds is also illegal. Also they are arguing that NM has an argument that DHS has not exempted the NM sections as exempt from NERA. The complaint is not very long, but it is the only one that challenges the funding specifically.
They are just flinging any and every outlandish theory, to see if anything sticks - or more likely, to provide their chosen hack judge a selection of flimsy threads to hang his foregone conclusion of a ruling on.
President Trump pretty well nailed it when he declared the Emergency - they will get an injunction where the appeal has to go to the Ninth Circuit, but ultimately the Supreme Court will uphold his legal authority.
To out of the three cases are before the same Northern California District Judge - whose court is only about a half mile from the Ninth Circuit Court in San Francisco.