Welcome to the forum!
Note that this forum is not the appropriate place where people are going to do paid work. (read the faq about homework for more info )
So converting from one to another is a matter of adapting the syntax (they are close to each other) and potential libraries or features. (for example p5js allows you to use web apis and in Java you have access to the operating system…)
If it’s too difficult for now, try to read the Processing tutorials and both references to convert the code yourself.
Also note that there isn’t a magic solution to convert p5js code to Processing!