A few months is a fairly long time, and that could either be good or bad. There's no easy answer. You must quickly do some research and find out what other benefits you might get from spending time there. It could be very boring and take away valuable time from your schedule, but frankly it can be whatever you choose to make of it. Being prepared and having a "can do" attitude, then, is crucial. Alternatively, you can always recluse there and get a lot of private thinking and writing done! Also, some of the travel benefits are obviously personal enrichment and growth, but we're talking here more about academic benefits. (These may intersect!)
Most importantly in my mind, foreign academic experience provides a different context to the research that you are already doing. Universities are usually multi-cultural places, and you may meet a lot of international students who will give you useful perspectives in addition to the host lab members. Email and join in activities with the international student society that they will no doubt have! We are global citizens, and to be a prominent and respected scientist in the future you will be expected to have a global presence. So, understanding global perspectives on your work is valuable.
That said, if you will be visiting a tiny country with little academic infrastructure or funding, this may not be a particularly relevant point. But if it's a well known university, or in a "bigger" country, then you should get some valuable perspective from it in this way, which will also improve the value of putting this experience on your CV.
Participating in nearby conferences, or at asking to give a research presentation at the host institution (e.g. just a regular department seminar), all looks very good on your CV. It's usually a "given" that you will at least be able to give a departmental seminar if you visit.
Finally, as a PhD student, it's sometimes hard to get adequate breadth of experience about your research area while working in one lab with one mentor. Look for the connections with your collaborator, not the differences. Realize that this is an opportunity to get "free" input on your work and advice about the broader field from people who care about similar things. You will probably learn some insightful, useful (maybe even surprising) things about your mentor's personality or scientific approach that will help you become more independently minded and mature as a scientist.
Maybe the perspectives of your host lab will help you broaden your appreciation for what you should aim for in your scientific career. There are a lot of bigger, inter-related questions beyond what your current lab cares about, which you might not yet be able to appreciate with your prior background.
Lastly, as an extra incentive, remember that your hosts might be your future peer reviewers or writers or recommendation letters! Personal networks are very important in academia, even if sometimes there is some scientific disconnect between the everyday work that you do.