I am looking for retreat centers for meditation in Germany and it should be a place that can be reached by train from Frankfurt. I would just like to go there for a few days without any special schedule.
Are there any recommendations?
You don't state what sort of meditation you want to engage in. I am assuming the temporal/spiritual sort (i.e., non-secular) in this answer...
You can try the Staatspark Fürstenlager (roughly "Prince's Lodge). It is 55 km due south of Frankfurt. Train access is possible (Frankfurt Hbf to Bensheim) leaving you with a half-hour walk into the park itself.
It was built in "Wotan's Forest" in the 18th century as a retreat for the Grand Duke of Hessen-Darmstadt and today the estate is maintained as a nature protection area.
There's a posh hotel on the estate (Parkhotel Herrenhaus), but there's also a small, 17th century hunting lodge further into the forest which has been converted to a modest kitchen with two or three rooms on the second floor (where I stayed).
More to the point, there's an ancient Russian Orthodox chapel there, almost entirely in ruins which might suit your purpose as a locale that inspires meditation. Alternatively, there is also a mineral spring and an ancient sub Roman temple on the estate. Near the estate there's a menhir! Clearly, the area has a long-standing connection with spiritual matters.
Alternatively, at the eastern end of the Frankfurt conurbation, on the Bavarian border, there is an ancient Benedictine monastery in Seligenstadt (roughly "blessed city"). It is no longer an active monastery, but the buildings and gardens have been restored and open to the public. Just across the river into Bavaria, there is a large lake which has been set aside as a bird sanctuary (which is quiet and peaceful). Leave from Frankfurt Hbf and alight in Seligenstadt city centre. From personal experience, there is an unobstructed bicycle path along the river all the way from Frankfurt/Sachsenhausen to Seligenstadt (and beyond). It takes about 2 hours and is a recommended journey in its own right.
For possibilities involving groups and events, you can check out the Megalithic Portal.